mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-29 22:30:33 +00:00
[DAG] OptLevelChanger - fix uninitialized variable analyzer warning (PR44471)
Ensure that OptLevelChanger::SavedFastISel is initialized in the constructor. This should be NFC - as the equivalent 'same opt level' early-out is used in the destructor as well, so SavedFastISel is only actually referenced in the general case. Differential Revision: https://reviews.llvm.org/D73875
This commit is contained in:
parent
96e59c0887
commit
67787997cf
@ -215,6 +215,7 @@ namespace llvm {
|
||||
OptLevelChanger(SelectionDAGISel &ISel,
|
||||
CodeGenOpt::Level NewOptLevel) : IS(ISel) {
|
||||
SavedOptLevel = IS.OptLevel;
|
||||
SavedFastISel = IS.TM.Options.EnableFastISel;
|
||||
if (NewOptLevel == SavedOptLevel)
|
||||
return;
|
||||
IS.OptLevel = NewOptLevel;
|
||||
@ -223,7 +224,6 @@ namespace llvm {
|
||||
<< IS.MF->getFunction().getName() << "\n");
|
||||
LLVM_DEBUG(dbgs() << "\tBefore: -O" << SavedOptLevel << " ; After: -O"
|
||||
<< NewOptLevel << "\n");
|
||||
SavedFastISel = IS.TM.Options.EnableFastISel;
|
||||
if (NewOptLevel == CodeGenOpt::None) {
|
||||
IS.TM.setFastISel(IS.TM.getO0WantsFastISel());
|
||||
LLVM_DEBUG(
|
||||
|
Loading…
Reference in New Issue
Block a user