A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://lists.llvm.org/pipermail/llvm-dev/2020-July/143260.html below:

[llvm-dev] question on analyzeBranch and getFallThrough

[llvm-dev] question on analyzeBranch and getFallThrough [llvm-dev] question on analyzeBranch and getFallThroughBagel via llvm-dev llvm-dev at lists.llvm.org
Thu Jul 9 14:32:34 PDT 2020
I am working on a back end for an architecture whose jump via table instruction
includes the range check. If the index is out of range, the jump table 
instruction just falls through.  I implemented a pass to remove the range check 
generated before the jump table instruction because it is superfluous.
This causes as assertion in MachineBlockPlacement.cpp:
       assert((!TII->analyzeBranch(*PrevBB, TBB, FBB, Cond) ||
               !PrevBB->canFallThrough()) &&
              "Unexpected block with un-analyzable fallthrough!");

The method MachineBasicBlock::getFallThrough() uses TII->analyzeBranch().
Using analyze branch there doesn't appear to be anyway to signify that a branch 
is not a simple conditional or a simple indirect but rather a combination of 
the two -- it conditionally branches indirect or falls through.

Is there a way to express this with analyzeBranch?

Can I override the method getFallThough?

Is there a way to annotate a basic block to indicate in can fall through?
It would seem this would save a lot of calls to analyzeBranck.

Any other ideas?

Thanks,
Brian
More information about the llvm-dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4