[PATCH] D40846: Add branch flag on branch instructions

Nemanja Ivanovic via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 5 15:38:59 PST 2017


nemanjai added a comment.

I think it's fine to set the flag on the asm parser defs. They certainly are branches.



================
Comment at: lib/Target/PowerPC/PPCInstrInfo.td:1291
 
-  let isCodeGenOnly = 1 in {
+  let isCodeGenOnly = 1, isBranch = 1 in {
     let Pattern = [(brcond i1:$bi, bb:$dst)] in
----------------
Why is this needed? This flag is set on line 1261.


================
Comment at: lib/Target/PowerPC/PPCInstrInfo.td:4282
 // Defs and Uses are conservative, since we don't know the BO value.
 let PPC970_Unit = 7 in {
+  let isBranch = 1, Defs = [CTR], Uses = [CTR, RM] in {
----------------
Why not just set the `isBranch` flag here rather than repeating it in a number of places within this scope?


https://reviews.llvm.org/D40846





More information about the llvm-commits mailing list