mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-24 23:28:41 +00:00
Allow readonly functions to unwind exceptions. Teach
the optimizers about this. For example, a readonly function with no uses cannot be removed unless it is also marked nounwind. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@71071 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -57,7 +57,7 @@ bool ADCE::runOnFunction(Function& F) {
|
||||
for (inst_iterator I = inst_begin(F), E = inst_end(F); I != E; ++I)
|
||||
if (isa<TerminatorInst>(I.getInstructionIterator()) ||
|
||||
isa<DbgInfoIntrinsic>(I.getInstructionIterator()) ||
|
||||
I->mayWriteToMemory()) {
|
||||
I->mayHaveSideEffects()) {
|
||||
alive.insert(I.getInstructionIterator());
|
||||
worklist.push_back(I.getInstructionIterator());
|
||||
}
|
||||
|
Reference in New Issue
Block a user