mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-01 02:33:44 +00:00
An Instruction has a trivial kill only if its use is in the same
basic block. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103725 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
2c18d3b0fe
commit
e1308d86ed
@ -57,9 +57,12 @@
|
||||
using namespace llvm;
|
||||
|
||||
bool FastISel::hasTrivialKill(const Value *V) const {
|
||||
// Don't consider constants or arguments to have trivial kills.
|
||||
// Don't consider constants or arguments to have trivial kills. Only
|
||||
// instructions with a single use in the same basic block.
|
||||
const Instruction *I = dyn_cast<Instruction>(V);
|
||||
return I && I->hasOneUse();
|
||||
return I &&
|
||||
I->hasOneUse() &&
|
||||
cast<Instruction>(I->use_begin())->getParent() == I->getParent();
|
||||
}
|
||||
|
||||
unsigned FastISel::getRegForValue(const Value *V) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user