mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-03-03 14:31:10 +00:00
Merge AutoUpgrade of EH magic variable.
$ svn merge -c 113600 https://llvm.org/svn/llvm-project/llvm/trunk --- Merging r113600 into '.': A test/Bitcode/AutoUpgradeGlobals.ll A test/Bitcode/AutoUpgradeGlobals.ll.bc U include/llvm/AutoUpgrade.h U lib/Bitcode/Reader/BitcodeReader.cpp U lib/VMCore/AutoUpgrade.cpp $ svn merge -c 113603 https://llvm.org/svn/llvm-project/llvm/trunk --- Merging r113603 into '.': G lib/VMCore/AutoUpgrade.cpp $ svn merge -c 113615 https://llvm.org/svn/llvm-project/llvm/trunk --- Merging r113615 into '.': G lib/VMCore/AutoUpgrade.cpp git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_28@114020 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
ed70cc3e1b
commit
19a50033ee
@ -16,6 +16,7 @@
|
|||||||
|
|
||||||
namespace llvm {
|
namespace llvm {
|
||||||
class Module;
|
class Module;
|
||||||
|
class GlobalVariable;
|
||||||
class Function;
|
class Function;
|
||||||
class CallInst;
|
class CallInst;
|
||||||
|
|
||||||
@ -35,6 +36,10 @@ namespace llvm {
|
|||||||
/// so that it can update all calls to the old function.
|
/// so that it can update all calls to the old function.
|
||||||
void UpgradeCallsToIntrinsic(Function* F);
|
void UpgradeCallsToIntrinsic(Function* F);
|
||||||
|
|
||||||
|
/// This checks for global variables which should be upgraded. It returns true
|
||||||
|
/// if it requires upgrading.
|
||||||
|
bool UpgradeGlobalVariable(GlobalVariable *GV);
|
||||||
|
|
||||||
/// This function checks debug info intrinsics. If an intrinsic is invalid
|
/// This function checks debug info intrinsics. If an intrinsic is invalid
|
||||||
/// then this function simply removes the intrinsic.
|
/// then this function simply removes the intrinsic.
|
||||||
void CheckDebugInfoIntrinsics(Module *M);
|
void CheckDebugInfoIntrinsics(Module *M);
|
||||||
|
@ -1297,6 +1297,12 @@ bool BitcodeReader::ParseModule() {
|
|||||||
UpgradedIntrinsics.push_back(std::make_pair(FI, NewFn));
|
UpgradedIntrinsics.push_back(std::make_pair(FI, NewFn));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Look for global variables which need to be renamed.
|
||||||
|
for (Module::global_iterator
|
||||||
|
GI = TheModule->global_begin(), GE = TheModule->global_end();
|
||||||
|
GI != GE; ++GI)
|
||||||
|
UpgradeGlobalVariable(GI);
|
||||||
|
|
||||||
// Force deallocation of memory for these vectors to favor the client that
|
// Force deallocation of memory for these vectors to favor the client that
|
||||||
// want lazy deserialization.
|
// want lazy deserialization.
|
||||||
std::vector<std::pair<GlobalVariable*, unsigned> >().swap(GlobalInits);
|
std::vector<std::pair<GlobalVariable*, unsigned> >().swap(GlobalInits);
|
||||||
|
@ -365,6 +365,18 @@ bool llvm::UpgradeIntrinsicFunction(Function *F, Function *&NewFn) {
|
|||||||
return Upgraded;
|
return Upgraded;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool llvm::UpgradeGlobalVariable(GlobalVariable *GV) {
|
||||||
|
StringRef Name(GV->getName());
|
||||||
|
|
||||||
|
// We are only upgrading one symbol here.
|
||||||
|
if (Name == ".llvm.eh.catch.all.value") {
|
||||||
|
GV->setName("llvm.eh.catch.all.value");
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
/// ExtendNEONArgs - For NEON "long" and "wide" operations, where the results
|
/// ExtendNEONArgs - For NEON "long" and "wide" operations, where the results
|
||||||
/// have vector elements twice as big as one or both source operands, do the
|
/// have vector elements twice as big as one or both source operands, do the
|
||||||
/// sign- or zero-extension that used to be handled by intrinsics. The
|
/// sign- or zero-extension that used to be handled by intrinsics. The
|
||||||
|
3
test/Bitcode/AutoUpgradeGlobals.ll
Normal file
3
test/Bitcode/AutoUpgradeGlobals.ll
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
; This isn't really an assembly file. It just runs test on bitcode to ensure
|
||||||
|
; it is auto-upgraded.
|
||||||
|
; RUN: llvm-dis < %s.bc | not grep {i32 @\\.llvm\\.eh}
|
BIN
test/Bitcode/AutoUpgradeGlobals.ll.bc
Normal file
BIN
test/Bitcode/AutoUpgradeGlobals.ll.bc
Normal file
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user