diff options
| author | Reid Spencer <rspencer@reidspencer.com> | 2006-01-16 21:12:35 +0000 |
|---|---|---|
| committer | Reid Spencer <rspencer@reidspencer.com> | 2006-01-16 21:12:35 +0000 |
| commit | b4f9a6f110ff455eaa3538275dcdbac0553031d4 (patch) | |
| tree | 5c5b78085c246bceae041a795428b7aa0718b0fd /llvm/lib/Bytecode | |
| parent | 84c00ea718b269d245dbf8921061537a25f3ba9e (diff) | |
| download | bcm5719-llvm-b4f9a6f110ff455eaa3538275dcdbac0553031d4.tar.gz bcm5719-llvm-b4f9a6f110ff455eaa3538275dcdbac0553031d4.zip | |
For PR411:
This patch is an incremental step towards supporting a flat symbol table.
It de-overloads the intrinsic functions by providing type-specific intrinsics
and arranging for automatically upgrading from the old overloaded name to
the new non-overloaded name. Specifically:
llvm.isunordered -> llvm.isunordered.f32, llvm.isunordered.f64
llvm.sqrt -> llvm.sqrt.f32, llvm.sqrt.f64
llvm.ctpop -> llvm.ctpop.i8, llvm.ctpop.i16, llvm.ctpop.i32, llvm.ctpop.i64
llvm.ctlz -> llvm.ctlz.i8, llvm.ctlz.i16, llvm.ctlz.i32, llvm.ctlz.i64
llvm.cttz -> llvm.cttz.i8, llvm.cttz.i16, llvm.cttz.i32, llvm.cttz.i64
New code should not use the overloaded intrinsic names. Warnings will be
emitted if they are used.
llvm-svn: 25366
Diffstat (limited to 'llvm/lib/Bytecode')
| -rw-r--r-- | llvm/lib/Bytecode/Reader/Reader.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/Bytecode/Reader/Reader.cpp b/llvm/lib/Bytecode/Reader/Reader.cpp index 5e6550215bf..8abf68c32ca 100644 --- a/llvm/lib/Bytecode/Reader/Reader.cpp +++ b/llvm/lib/Bytecode/Reader/Reader.cpp @@ -17,6 +17,7 @@ //===----------------------------------------------------------------------===// #include "Reader.h" +#include "llvm/Assembly/AutoUpgrade.h" #include "llvm/Bytecode/BytecodeHandler.h" #include "llvm/BasicBlock.h" #include "llvm/CallingConv.h" @@ -2002,6 +2003,7 @@ void BytecodeReader::ParseModuleGlobalInfo() { // Insert the place holder. Function *Func = new Function(FTy, GlobalValue::ExternalLinkage, "", TheModule); + UpgradeIntrinsicFunction(Func); insertValue(Func, (FnSignature & (~0U >> 1)) >> 5, ModuleValues); // Flags are not used yet. |

