| Index: src/IceCfg.cpp
|
| diff --git a/src/IceCfg.cpp b/src/IceCfg.cpp
|
| index 5797fdcaf6375139dc1dc611e27792fdbba838cf..d1a78b24b2c8c93d2edc4fc2a576ce6f4e22acbe 100644
|
| --- a/src/IceCfg.cpp
|
| +++ b/src/IceCfg.cpp
|
| @@ -23,6 +23,7 @@
|
| #include "IceGlobalInits.h"
|
| #include "IceInst.h"
|
| #include "IceLiveness.h"
|
| +#include "IceLoopAnalyzer.h"
|
| #include "IceOperand.h"
|
| #include "IceTargetLowering.h"
|
|
|
| @@ -462,10 +463,16 @@ void Cfg::genFrame() {
|
| getTarget()->addEpilog(Node);
|
| }
|
|
|
| -// This is a lightweight version of live-range-end calculation. Marks
|
| -// the last use of only those variables whose definition and uses are
|
| -// completely with a single block. It is a quick single pass and
|
| -// doesn't need to iterate until convergence.
|
| +void Cfg::computeLoopNestDepth() {
|
| + TimerMarker T(TimerStack::TT_computeLoopNestDepth, this);
|
| + LoopAnalyzer LA(this);
|
| + LA.computeLoopNestDepth();
|
| +}
|
| +
|
| +// This is a lightweight version of live-range-end calculation. Marks the last
|
| +// use of only those variables whose definition and uses are completely with a
|
| +// single block. It is a quick single pass and doesn't need to iterate until
|
| +// convergence.
|
| void Cfg::livenessLightweight() {
|
| TimerMarker T(TimerStack::TT_livenessLightweight, this);
|
| getVMetadata()->init(VMK_Uses);
|
| @@ -606,12 +613,11 @@ bool Cfg::validateLiveness() const {
|
| }
|
|
|
| void Cfg::contractEmptyNodes() {
|
| - // If we're decorating the asm output with register liveness info,
|
| - // this information may become corrupted or incorrect after
|
| - // contracting nodes that contain only redundant assignments. As
|
| - // such, we disable this pass when DecorateAsm is specified. This
|
| - // may make the resulting code look more branchy, but it should have
|
| - // no effect on the register assignments.
|
| + // If we're decorating the asm output with register liveness info, this
|
| + // information may become corrupted or incorrect after contracting nodes that
|
| + // contain only redundant assignments. As such, we disable this pass when
|
| + // DecorateAsm is specified. This may make the resulting code look more
|
| + // branchy, but it should have no effect on the register assignments.
|
| if (Ctx->getFlags().getDecorateAsm())
|
| return;
|
| for (CfgNode *Node : Nodes) {
|
|
|