diff options
author | Robert Muth <robertm@chromium.org> | 2012-09-17 15:27:33 -0400 |
---|---|---|
committer | Robert Muth <robertm@chromium.org> | 2012-09-17 15:27:33 -0400 |
commit | 8d211d5b87f167bfa4ddedc81b039c94e192f3ca (patch) | |
tree | d0c983deb0720e0eac757e9a3ae7bdda52b2d35f /include/llvm | |
parent | 0365986a33ef5d04ea505cf1d73299386f01fdf9 (diff) |
Add a pass to llvm to rewrite the bitcode in an
arch specific way to mimic the native calling convention.
The goal is to make this good enough for ppapi interfaces.
Review URL: https://chromiumcodereview.appspot.com/10912128
Diffstat (limited to 'include/llvm')
-rw-r--r-- | include/llvm/InitializePasses.h | 1 | ||||
-rw-r--r-- | include/llvm/Transforms/Scalar.h | 2 | ||||
-rw-r--r-- | include/llvm/Value.h | 6 |
3 files changed, 8 insertions, 1 deletions
diff --git a/include/llvm/InitializePasses.h b/include/llvm/InitializePasses.h index de97957a84..3c0ab0f33c 100644 --- a/include/llvm/InitializePasses.h +++ b/include/llvm/InitializePasses.h @@ -256,6 +256,7 @@ void initializeUnpackMachineBundlesPass(PassRegistry&); void initializeFinalizeMachineBundlesPass(PassRegistry&); void initializeBBVectorizePass(PassRegistry&); void initializeMachineFunctionPrinterPassPass(PassRegistry&); +void initializeNaClCcRewritePass(PassRegistry&); // @LOCALMOD } #endif diff --git a/include/llvm/Transforms/Scalar.h b/include/llvm/Transforms/Scalar.h index 3dce6fe37f..29b5233e22 100644 --- a/include/llvm/Transforms/Scalar.h +++ b/include/llvm/Transforms/Scalar.h @@ -366,7 +366,7 @@ extern char &InstructionSimplifierID; // "block_weights" metadata. FunctionPass *createLowerExpectIntrinsicPass(); - +FunctionPass *createNaClCcRewritePass(const TargetLowering *TLI = 0); } // End llvm namespace #endif diff --git a/include/llvm/Value.h b/include/llvm/Value.h index a82ac45c49..d7ccd4dccc 100644 --- a/include/llvm/Value.h +++ b/include/llvm/Value.h @@ -104,6 +104,12 @@ public: /// Type *getType() const { return VTy; } + // @LOCALMOD-START + // Currently only used for function type update during + // the NaCl calling convention rewrite pass + void setType(Type* t) { VTy = t; } + // @LOCALMOD-END + /// All values hold a context through their type. LLVMContext &getContext() const; |