Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
Pyston
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
Pyston
Commits
8497cc62
Commit
8497cc62
authored
Nov 04, 2014
by
Kevin Modzelewski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rebase to llvm trunk
parent
62dc79a2
Changes
10
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
38 additions
and
14 deletions
+38
-14
llvm_revision.txt
llvm_revision.txt
+1
-1
src/Makefile
src/Makefile
+1
-0
src/codegen/codegen.cpp
src/codegen/codegen.cpp
+4
-0
src/codegen/opt/inliner.cpp
src/codegen/opt/inliner.cpp
+6
-1
src/codegen/patchpoints.cpp
src/codegen/patchpoints.cpp
+6
-6
src/codegen/stackmaps.cpp
src/codegen/stackmaps.cpp
+5
-1
src/codegen/unwinding.cpp
src/codegen/unwinding.cpp
+12
-2
src/core/thread_utils.h
src/core/thread_utils.h
+1
-1
src/core/threading.cpp
src/core/threading.cpp
+1
-1
tools/publicize.cpp
tools/publicize.cpp
+1
-1
No files found.
llvm_revision.txt
View file @
8497cc62
2
1917
2
2
2122
2
src/Makefile
View file @
8497cc62
...
...
@@ -138,6 +138,7 @@ COMMON_CXXFLAGS += -fexceptions -fno-rtti
COMMON_CXXFLAGS
+=
-Wno-invalid-offsetof
# allow the use of "offsetof", and we'll just have to make sure to only use it legally.
COMMON_CXXFLAGS
+=
-DENABLE_INTEL_JIT_EVENTS
=
$(ENABLE_INTEL_JIT_EVENTS)
COMMON_CXXFLAGS
+=
-I
$(DEPS_DIR)
/pypa-install/include
COMMON_CXXFLAGS
+=
-Wno-inconsistent-missing-override
ifeq
($(ENABLE_VALGRIND),0)
COMMON_CXXFLAGS
+=
-DNVALGRIND
...
...
src/codegen/codegen.cpp
View file @
8497cc62
...
...
@@ -151,8 +151,12 @@ public:
code
=
I
->
getSection
(
section
);
assert
(
!
code
);
bool
is_text
;
#if LLVMREV < 219314
code
=
section
->
isText
(
is_text
);
assert
(
!
code
);
#else
is_text
=
section
->
isText
();
#endif
if
(
!
is_text
)
continue
;
...
...
src/codegen/opt/inliner.cpp
View file @
8497cc62
...
...
@@ -172,8 +172,13 @@ public:
}
// We load the bitcode lazily, so check if we haven't yet fully loaded the function:
if
(
f
->
isMaterializable
())
if
(
f
->
isMaterializable
())
{
#if LLVMREV < 220600
f
->
Materialize
();
#else
f
->
materialize
();
#endif
}
// It could still be a declaration, though I think the code won't generate this case any more:
if
(
f
->
isDeclaration
())
...
...
src/codegen/patchpoints.cpp
View file @
8497cc62
...
...
@@ -29,7 +29,7 @@
namespace
pyston
{
void
PatchpointInfo
::
addFrameVar
(
const
std
::
string
&
name
,
CompilerType
*
type
)
{
frame_vars
.
push_back
(
FrameVarInfo
({
.
name
=
name
,
.
type
=
type
}));
frame_vars
.
push_back
(
FrameVarInfo
({.
name
=
name
,
.
type
=
type
}));
}
int
ICSetupInfo
::
totalSize
()
const
{
...
...
@@ -79,7 +79,7 @@ void PatchpointInfo::parseLocationMap(StackMap::Record* r, LocationMap* map) {
// printf("%s %d %d\n", frame_var.name.c_str(), r->locations[cur_arg].type, r->locations[cur_arg].regnum);
map
->
names
[
frame_var
.
name
].
locations
.
push_back
(
LocationMap
::
LocationTable
::
LocationEntry
({
.
_debug_pp_id
=
(
uint64_t
)
this
,
LocationMap
::
LocationTable
::
LocationEntry
({.
_debug_pp_id
=
(
uint64_t
)
this
,
.
offset
=
r
->
offset
,
.
length
=
patchpointSize
(),
.
type
=
frame_var
.
type
,
...
...
src/codegen/stackmaps.cpp
View file @
8497cc62
...
...
@@ -180,9 +180,13 @@ void StackmapJITEventListener::NotifyObjectEmitted(const llvm::ObjectImage& Obj)
llvm
::
object
::
section_iterator
section
(
Obj
.
end_sections
());
code
=
I
->
getSection
(
section
);
assert
(
!
code
);
#if LLVMREV < 219314
code
=
section
->
getSize
(
stackmap_size
);
assert
(
stackmap_size
>
0
);
assert
(
!
code
);
#else
stackmap_size
=
section
->
getSize
();
#endif
assert
(
stackmap_size
>
0
);
ASSERT
(
ptr
.
i8
-
start_ptr
==
stackmap_size
,
"%ld %ld"
,
ptr
.
i8
-
start_ptr
,
stackmap_size
);
#endif
...
...
src/codegen/unwinding.cpp
View file @
8497cc62
...
...
@@ -152,8 +152,8 @@ public:
// Currently-unused libunwind support:
llvm_error_code
code
;
bool
found_text
=
false
,
found_eh_frame
=
false
;
uint64_t
text_addr
,
text_size
;
uint64_t
eh_frame_addr
,
eh_frame_size
;
uint64_t
text_addr
=
-
1
,
text_size
=
-
1
;
uint64_t
eh_frame_addr
=
-
1
,
eh_frame_size
=
-
1
;
for
(
llvm
::
object
::
section_iterator
I
=
Obj
.
begin_sections
(),
E
=
Obj
.
end_sections
();
I
!=
E
;
++
I
)
{
llvm
::
StringRef
name
;
...
...
@@ -163,20 +163,30 @@ public:
uint64_t
addr
,
size
;
if
(
name
==
".eh_frame"
)
{
assert
(
!
found_eh_frame
);
#if LLVMREV < 219314
if
(
I
->
getAddress
(
eh_frame_addr
))
continue
;
if
(
I
->
getSize
(
eh_frame_size
))
continue
;
#else
eh_frame_addr
=
I
->
getAddress
();
eh_frame_size
=
I
->
getSize
();
#endif
if
(
VERBOSITY
())
printf
(
"eh_frame: %lx %lx
\n
"
,
eh_frame_addr
,
eh_frame_size
);
found_eh_frame
=
true
;
}
else
if
(
name
==
".text"
)
{
assert
(
!
found_text
);
#if LLVMREV < 219314
if
(
I
->
getAddress
(
text_addr
))
continue
;
if
(
I
->
getSize
(
text_size
))
continue
;
#else
text_addr
=
I
->
getAddress
();
text_size
=
I
->
getSize
();
#endif
if
(
VERBOSITY
())
printf
(
"text: %lx %lx
\n
"
,
text_addr
,
text_size
);
...
...
src/core/thread_utils.h
View file @
8497cc62
...
...
@@ -159,7 +159,7 @@ private:
}
template
<
int
...
S
>
Storage
*
make
(
impl
::
seq
<
S
...
>
)
{
return
new
Storage
{
.
self
=
this
,
.
val
=
T
(
std
::
get
<
S
>
(
ctor_args
)...)
};
return
new
Storage
{.
self
=
this
,
.
val
=
T
(
std
::
get
<
S
>
(
ctor_args
)...)
};
}
public:
...
...
src/core/threading.cpp
View file @
8497cc62
...
...
@@ -283,7 +283,7 @@ intptr_t start_thread(void* (*start_func)(Box*, Box*, Box*), Box* arg1, Box* arg
num_starting_threads
++
;
}
ThreadStartArgs
*
args
=
new
ThreadStartArgs
({
.
start_func
=
start_func
,
.
arg1
=
arg1
,
.
arg2
=
arg2
,
.
arg3
=
arg3
});
ThreadStartArgs
*
args
=
new
ThreadStartArgs
({.
start_func
=
start_func
,
.
arg1
=
arg1
,
.
arg2
=
arg2
,
.
arg3
=
arg3
});
pthread_t
thread_id
;
int
code
=
pthread_create
(
&
thread_id
,
NULL
,
&
_thread_start
,
args
);
...
...
tools/publicize.cpp
View file @
8497cc62
...
...
@@ -129,7 +129,7 @@ bool updateTBAA(Function* f) {
LLVMContext
&
c
=
f
->
getContext
();
for
(
auto
it
=
inst_begin
(
f
),
end
=
inst_end
(
f
);
it
!=
end
;
++
it
)
{
MDNode
*
tbaa
=
it
->
getM
etadata
(
LLVMContext
::
MD_tbaa
);
MDNode
*
tbaa
=
it
->
getM
DNode
(
LLVMContext
::
MD_tbaa
);
if
(
!
tbaa
)
continue
;
//tbaa->dump();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment