- User Since
- Feb 19 2019, 1:58 AM (30 w, 1 d)
- MCTargetOptions is now always passed to MCAsmInfo (or rather createMCAsmInfo). In places where we it wasn't available before we simply pass empty MCTargetOptions.
- Patch is now for monorepo. Besides LLVM there are now changes to Clang and LLDB. I needed to use monorepo to test if everything builds correctly. If this is accepted I will split it into separate patches if needed.
- Also it might be best to split this into two changes. First one that adds MCTargetOptions to MCAsmInfo and second one that fixes prefix for Mips which is what I set out to solve.
Fri, Sep 6
More detailed explanation follows:
Wed, Aug 28
Changed Optional<const MCTargetOptions *> with const MCTargetOptions *
Tue, Aug 27
- adjustPrefixes() is not called after every call of createMCAsmInfo(), only where MCTargetOptions is available since this is what tells us if ABI is given as argument.
Aug 8 2019
Aug 7 2019
- Removed unused function declarations.
Aug 6 2019
Symbol with offset was not handled properly on MipsR6. R_MIPS_LO16 (MipsMCExpr::MEK_LO) would write offset into lower 16 bits, where as for R6 version offset is in bits 7-15. Initially I made new type of MCFixup which would only use those bits, but then there was a lot of additional code needed for handling all cases where MCFixups were used. Now we just add ADDIU for R6 and use R_MIPS_LO16 on that instruction which is the same way that gcc works.
Jul 24 2019
- Decided to apply diff of the alternative solution because the patch could not be downloaded with just the provided diff.
Sorry for the delay. I was away for a while.
- Marked undef DSPControl registers as live-in to the function and basic block.
Jul 22 2019
Alternative solution that does not remove out-register would look something like this: https://reviews.llvm.org/differential/diff/211116/
Jul 5 2019
Jun 27 2019
- Added a comment in: removeOperandFromDeadImplRegs()
- Removed MO.setIsDead() from markOperandInDeadImplRegs() and renamed to checkOperandForDeadImplRegs().
- Added a comment in: checkOperandForDeadImplRegs().
- Decided to remove the change from addDSPCtrlRegOperands() which marked RDDSP operands as implicit undef. Machine verifier would fail if only RDDSP was used without some other instruction previously defining a register. We could handle these Undef flags the same way we handle dead flags for other instructions (when we remove dead from previous we can also remove undef from current), but I don't think we need to touch these flags.
Jun 26 2019
Marked all instructions that define part of DSPControl register with TSFlag named defsDSPCtrl. This helps us avoid running unnecessary code on instructions that don't need it.
Jun 19 2019
Fixed comment typos.
All changes are now in code for Mips target. Only change in common code is in removing there lines in LiveVariables.cpp that are preceded by a FIXME comment. Also, tests that check other DSPControl registers are added.
Problem with handling everything in post-isel hooks is that it is after marking registers as dead. So we would need to mark every instruction that uses any part of DSPControl as having an post-isel hook and there are more than 100 instructions (including MicroMips variants).
Jun 12 2019
Jun 5 2019
I would like to avoid having "undead" registers, which are marked dead but are semantically necessary, at any point. That means never calling setIsDead(false); as part of instruction selection, even if the flags are eventually correct after post-isel hooks run.
May 30 2019
The changes can be seen in some functions in test CodeGen/Mips/dsp-r1.ll. Where we previously had:
May 14 2019
It seems that using the instruction without offset does not affect exception
handling. Testing it on a couple of simple examples where unwinding the stack
is necessary gives correct output. This is expected since GAS uses the same
instructions. Documentation does not indicate that there are any differences
between these two instructions if we don't change the offset (in code before the
patch value passed was +0). This patch may be unnecessary but if we want to be
sure that there aren't any unexpected problems down the line we could apply it.
Apr 24 2019
Addressed review comments.
Mar 19 2019
We simply weaken the condition to not include micromips.
I guess you mean mips16 not micromips in the comment to the patch. Right?
Mar 18 2019
Test was updated to include micromips. Since this is an older test the output was not generated with update_llc_test_checks.py so only lines that differ from mips were updated using new prefixes. Should I update the test with the given script? It could give quite a large output. Also new prefixes for each line might need to be introduced.
Mar 13 2019
For me it already says that this revision is abandoned. I abandoned it back when we decided to combine this patch and it's parent.
Mar 11 2019
Removed micromips 32r6 RUN: line. MTHI and MTLO were removed from micromips R6 so this test is unnecessary.
Combined with it's parent revision.
Combined with it's child revision D59204.
Mar 8 2019
Addressed review comments.
Mar 7 2019
Mar 6 2019
Pattern matches for other configurations are added. Thanks for mentioning that. I've also added -asm-show-inst to RUN: lines that show which version of TRUNC_W will be chosen since that is what this patch is doing.
Feb 27 2019
Feb 22 2019
Addressed review comments.