projects
/
oota-llvm.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
ADDS{D|S}rr_Int and MULS{D|S}rr_Int are not commutable. The users of these intrinsics...
[oota-llvm.git]
/
lib
/
CodeGen
/
GCStrategy.cpp
diff --git
a/lib/CodeGen/GCStrategy.cpp
b/lib/CodeGen/GCStrategy.cpp
index 517b3a7762e7e3c70ff2f542bf42b46907fa276b..ad7421abc2117c9ceef4129974efd0a2162e4a6e 100644
(file)
--- a/
lib/CodeGen/GCStrategy.cpp
+++ b/
lib/CodeGen/GCStrategy.cpp
@@
-144,7
+144,7
@@
bool LowerIntrinsics::doInitialization(Module &M) {
// work against the entire module. But this cannot be done at
// runFunction time (initializeCustomLowering likely needs to change
// the module).
// work against the entire module. But this cannot be done at
// runFunction time (initializeCustomLowering likely needs to change
// the module).
- GCModuleInfo *MI = getAnalysis
ToUpdat
e<GCModuleInfo>();
+ GCModuleInfo *MI = getAnalysis
IfAvailabl
e<GCModuleInfo>();
assert(MI && "LowerIntrinsics didn't require GCModuleInfo!?");
for (Module::iterator I = M.begin(), E = M.end(); I != E; ++I)
if (!I->isDeclaration() && I->hasGC())
assert(MI && "LowerIntrinsics didn't require GCModuleInfo!?");
for (Module::iterator I = M.begin(), E = M.end(); I != E; ++I)
if (!I->isDeclaration() && I->hasGC())
@@
-313,7
+313,7
@@
FunctionPass *llvm::createGCMachineCodeAnalysisPass() {
char MachineCodeAnalysis::ID = 0;
MachineCodeAnalysis::MachineCodeAnalysis()
char MachineCodeAnalysis::ID = 0;
MachineCodeAnalysis::MachineCodeAnalysis()
- : MachineFunctionPass(
intptr_t(&ID)
) {}
+ : MachineFunctionPass(
&ID
) {}
const char *MachineCodeAnalysis::getPassName() const {
return "Analyze Machine Code For Garbage Collection";
const char *MachineCodeAnalysis::getPassName() const {
return "Analyze Machine Code For Garbage Collection";
@@
-329,7
+329,9
@@
void MachineCodeAnalysis::getAnalysisUsage(AnalysisUsage &AU) const {
unsigned MachineCodeAnalysis::InsertLabel(MachineBasicBlock &MBB,
MachineBasicBlock::iterator MI) const {
unsigned Label = MMI->NextLabelID();
unsigned MachineCodeAnalysis::InsertLabel(MachineBasicBlock &MBB,
MachineBasicBlock::iterator MI) const {
unsigned Label = MMI->NextLabelID();
- BuildMI(MBB, MI, TII->get(TargetInstrInfo::GC_LABEL)).addImm(Label);
+ // N.B. we assume that MI is *not* equal to the "end()" iterator.
+ BuildMI(MBB, MI, MI->getDebugLoc(),
+ TII->get(TargetInstrInfo::GC_LABEL)).addImm(Label);
return Label;
}
return Label;
}