You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
wip: I fixed all issues reported with -verify-machineinstrs, need LARGE cleanup now ...
While at it, I implemented some quick optimization.
- Implemented `(1 << n) - 1` == `lslx lneg n`
#9
- Moved some 64-bit operation earlier in the pipeline,
from ResolveMacroInstrPass to expandPostRA.
I tried even earlier, but SUBC is not well defined and get moved around during MergeSink
for critical edge split. The computation is then wrong because require to be packed for the
particular use I identified.
I leave my experiment here. I will check to fully define it and move it preRA, or will leave it
like that again for a while, fulfilling my other duty.
- Fixed a few easy Def/Use when BuildMI
- Fixed lose of MachineInstr correctness
Our arithmetic+comp+branch was destroyed during analyzeBranch/removeBranch/insertBranch
- temporarily removed fusion of any instruction + JUMPi in MergeComboInstr
The problem is that at this stage (PreEmit):
- machine CFG is done.
- JUMPi is unconditional jump
- arithmetic + cond + branch; with cond as True/False is conditional
-- even if we know that cond with true/false is unconditional, the instruction have the
-- property of being conditional by its definition.
---- To fix that, I will create other PseudoInstruction to have them set correctly.
---- Also, if those arith+cond+branch do have pattern, maybe they could be selected far earlier
---- and the machine CFG would be correctly formed at the first place probably.
- issue with ThinLTO fixed
-- some code construction ended up in SELECTrr, which is not common for us
---- this is lowered to TmpJcc
---- and TmpJcc is kind of wrong
------ and finally, MergeComboInstr was combining even more wrong.
--> I removed TmpJcc, and use simply our well defined JEQrii
- issue whith ThinLTO fixed
-- another was present but undetected on Release build
-- we use multiple address spacees (IRAM, WRAM, MRAM)
-- there was an assertion with ThinLTO when populating GV out of multiple modules
---- it's fixed in llvm13, but we are on llvm12
------ I reproduced the patch (not cherry-picked) llvm@60c60dd
------ just for now. will do that correctly when cleaning up
------- so when I will upgrade our LLVM, it will be mergeable easily
0 commit comments