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
02de697c
Commit
02de697c
authored
Apr 03, 2014
by
Kevin Modzelewski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Clean up includes in a vain attempt to improve compilation speed
It looks like the culprit is IRBuilder<>
parent
3462e587
Changes
13
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
53 additions
and
33 deletions
+53
-33
src/codegen/codegen.cpp
src/codegen/codegen.cpp
+5
-0
src/codegen/codegen.h
src/codegen/codegen.h
+10
-6
src/codegen/compvars.cpp
src/codegen/compvars.cpp
+9
-0
src/codegen/compvars.h
src/codegen/compvars.h
+7
-12
src/codegen/dis.cpp
src/codegen/dis.cpp
+1
-0
src/codegen/gcbuilder.h
src/codegen/gcbuilder.h
+3
-1
src/codegen/irgen.cpp
src/codegen/irgen.cpp
+4
-0
src/codegen/irgen.h
src/codegen/irgen.h
+4
-2
src/codegen/irgen/hooks.cpp
src/codegen/irgen/hooks.cpp
+1
-0
src/codegen/irgen/irgenerator.cpp
src/codegen/irgen/irgenerator.cpp
+1
-6
src/codegen/irgen/util.cpp
src/codegen/irgen/util.cpp
+3
-0
src/codegen/llvm_interpreter.cpp
src/codegen/llvm_interpreter.cpp
+2
-0
src/codegen/opt/const_classes.cpp
src/codegen/opt/const_classes.cpp
+3
-6
No files found.
src/codegen/codegen.cpp
View file @
02de697c
...
...
@@ -19,6 +19,8 @@
#include "llvm/ExecutionEngine/JITEventListener.h"
#include "llvm/ExecutionEngine/ObjectImage.h"
#include "llvm/IR/LLVMContext.h"
#include "llvm/IR/Module.h"
#include "core/util.h"
...
...
@@ -170,6 +172,9 @@ class RegistryEventListener : public llvm::JITEventListener {
}
};
GlobalState
::
GlobalState
()
:
context
(
llvm
::
getGlobalContext
())
{
};
llvm
::
JITEventListener
*
makeRegistryListener
()
{
return
new
RegistryEventListener
();
}
...
...
src/codegen/codegen.h
View file @
02de697c
...
...
@@ -17,15 +17,20 @@
#include <unordered_map>
#include "llvm/ExecutionEngine/ExecutionEngine.h"
#include "llvm/IR/IRBuilder.h"
#include "llvm/IR/Module.h"
//#include "llvm/IR/IRBuilder.h"
#include "core/types.h"
#include "codegen/gcbuilder.h"
#include "codegen/runtime_hooks.h"
namespace
llvm
{
class
ExecutionEngine
;
class
JITEventListener
;
class
LLVMContext
;
class
Module
;
class
TargetMachine
;
}
namespace
pyston
{
class
PystonJITEventListener
;
...
...
@@ -74,8 +79,7 @@ struct GlobalState {
GlobalFuncs
funcs
;
GlobalState
()
:
context
(
llvm
::
getGlobalContext
())
{
};
GlobalState
();
};
extern
GlobalState
g
;
...
...
src/codegen/compvars.cpp
View file @
02de697c
...
...
@@ -16,11 +16,13 @@
#include <sstream>
#include "llvm/IR/IntrinsicInst.h"
#include "llvm/Support/raw_ostream.h"
#include "core/options.h"
#include "core/types.h"
#include "codegen/compvars.h"
#include "codegen/gcbuilder.h"
#include "codegen/patchpoints.h"
#include "codegen/irgen.h"
#include "codegen/irgen/util.h"
...
...
@@ -32,6 +34,13 @@
namespace
pyston
{
std
::
string
ValuedCompilerType
<
llvm
::
Value
*>::
debugName
()
{
std
::
string
rtn
;
llvm
::
raw_string_ostream
os
(
rtn
);
llvmType
()
->
print
(
os
);
return
rtn
;
}
struct
RawInstanceMethod
{
CompilerVariable
*
obj
,
*
func
;
...
...
src/codegen/compvars.h
View file @
02de697c
...
...
@@ -18,8 +18,6 @@
#include <vector>
#include <stdint.h>
#include "llvm/Support/raw_ostream.h"
#include "core/types.h"
#include "codegen/codegen.h"
...
...
@@ -27,6 +25,7 @@
namespace
pyston
{
class
CompilerType
;
class
IREmitter
;
extern
ConcreteCompilerType
*
INT
,
*
BOXED_INT
,
*
FLOAT
,
*
BOXED_FLOAT
,
*
VOID
,
*
UNKNOWN
,
*
BOOL
,
*
STR
,
*
NONE
,
*
LIST
,
*
SLICE
,
*
MODULE
,
*
DICT
,
*
BOOL
,
*
BOXED_BOOL
,
*
BOXED_TUPLE
;
extern
CompilerType
*
UNDEF
;
...
...
@@ -136,12 +135,8 @@ template <>
class
ValuedCompilerType
<
llvm
::
Value
*>
:
public
_ValuedCompilerType
<
llvm
::
Value
*>
{
public:
virtual
llvm
::
Type
*
llvmType
()
=
0
;
virtual
std
::
string
debugName
()
{
std
::
string
rtn
;
llvm
::
raw_string_ostream
os
(
rtn
);
llvmType
()
->
print
(
os
);
return
rtn
;
}
virtual
std
::
string
debugName
();
virtual
bool
isFitBy
(
BoxedClass
*
)
{
printf
(
"isFitBy not defined for %s
\n
"
,
debugName
().
c_str
());
abort
();
...
...
@@ -303,10 +298,10 @@ class ValuedCompilerVariable : public CompilerVariable {
}
};
template
<
>
inline
ConcreteCompilerVariable
::
ValuedCompilerVariable
(
ConcreteCompilerType
*
type
,
llvm
::
Value
*
value
,
bool
grabbed
)
:
CompilerVariable
(
grabbed
),
type
(
type
),
value
(
value
)
{
assert
(
value
->
getType
()
==
type
->
llvmType
());
}
//
template <>
//
inline ConcreteCompilerVariable::ValuedCompilerVariable(ConcreteCompilerType *type, llvm::Value* value, bool grabbed) : CompilerVariable(grabbed), type(type), value(value) {
//
assert(value->getType() == type->llvmType());
//
}
CompilerVariable
*
makeInt
(
int64_t
);
CompilerVariable
*
makeFloat
(
double
);
...
...
src/codegen/dis.cpp
View file @
02de697c
...
...
@@ -32,6 +32,7 @@
#include "llvm/Support/FormattedStream.h"
#include "llvm/Support/TargetRegistry.h"
#include "llvm/Support/TargetSelect.h"
#include "llvm/Target/TargetMachine.h"
#include "codegen/codegen.h"
...
...
src/codegen/gcbuilder.h
View file @
02de697c
...
...
@@ -15,7 +15,9 @@
#ifndef PYSTON_CODEGEN_GCBUILDER_H
#define PYSTON_CODEGEN_GCBUILDER_H
#include "llvm/IR/Value.h"
namespace
llvm
{
class
Value
;
}
namespace
pyston
{
...
...
src/codegen/irgen.cpp
View file @
02de697c
...
...
@@ -20,7 +20,10 @@
#include "llvm/DIBuilder.h"
#include "llvm/PassManager.h"
#include "llvm/Analysis/Passes.h"
#include "llvm/IR/Module.h"
#include "llvm/IR/Verifier.h"
#include "llvm/Support/FileSystem.h"
#include "llvm/Target/TargetMachine.h"
#include "llvm/Transforms/Instrumentation.h"
#include "llvm/Transforms/Scalar.h"
...
...
@@ -33,6 +36,7 @@
#include "codegen/codegen.h"
#include "codegen/compvars.h"
#include "codegen/gcbuilder.h"
#include "codegen/irgen.h"
#include "codegen/patchpoints.h"
#include "codegen/osrentry.h"
...
...
src/codegen/irgen.h
View file @
02de697c
...
...
@@ -16,7 +16,8 @@
#define PYSTON_CODEGEN_IRGEN_H
#include "llvm/IR/Function.h"
#include "llvm/IR/IntrinsicInst.h"
#include "llvm/IR/Intrinsics.h"
#include "llvm/IR/IRBuilder.h"
#include "core/types.h"
...
...
@@ -26,8 +27,9 @@
namespace
pyston
{
class
AST_expr
;
class
GCBuilder
;
class
IREmitter
;
class
MyInserter
:
public
llvm
::
IRBuilderDefaultInserter
<
true
>
{
private:
IREmitter
*
emitter
;
...
...
src/codegen/irgen/hooks.cpp
View file @
02de697c
...
...
@@ -12,6 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#include "llvm/ExecutionEngine/ExecutionEngine.h"
#include "llvm/Support/raw_ostream.h"
#include "core/common.h"
...
...
src/codegen/irgen/irgenerator.cpp
View file @
02de697c
...
...
@@ -13,17 +13,12 @@
// limitations under the License.
#include "llvm/DIBuilder.h"
#include "llvm/PassManager.h"
#include "llvm/IR/Function.h"
#include "llvm/IR/Instructions.h"
#include "llvm/IR/Verifier.h"
#include "llvm/IR/Module.h"
#include "core/ast.h"
#include "core/cfg.h"
#include "core/util.h"
#include "codegen/codegen.h"
#include "codegen/compvars.h"
#include "codegen/osrentry.h"
#include "codegen/patchpoints.h"
...
...
src/codegen/irgen/util.cpp
View file @
02de697c
...
...
@@ -15,6 +15,9 @@
#include <sstream>
#include <unordered_map>
#include "llvm/IR/Constants.h"
#include "llvm/IR/Instructions.h"
#include "llvm/IR/Module.h"
#include "llvm/Support/InstIterator.h"
#include "llvm/Transforms/Utils/Cloning.h"
...
...
src/codegen/llvm_interpreter.cpp
View file @
02de697c
...
...
@@ -17,6 +17,8 @@
#include "llvm/IR/Constants.h"
#include "llvm/IR/DataLayout.h"
#include "llvm/IR/Instructions.h"
#include "llvm/IR/Module.h"
#include "core/common.h"
#include "core/stats.h"
...
...
src/codegen/opt/const_classes.cpp
View file @
02de697c
...
...
@@ -18,17 +18,14 @@
#include <set>
#include "llvm/ADT/Statistic.h"
#include "llvm/Analysis/PostDominators.h"
#include "llvm/Pass.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/InstIterator.h"
#include "llvm/Support/raw_ostream.h"
#include "llvm/Analysis/Passes.h"
#include "llvm/Analysis/MemoryBuiltins.h"
#include "llvm/Pass.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/GetElementPtrTypeIterator.h"
#include "llvm/Support/InstIterator.h"
#include "llvm/Support/raw_ostream.h"
#include "llvm/Target/TargetMachine.h"
#include "core/common.h"
#include "core/options.h"
...
...
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