- User Since
- Feb 19 2019, 1:58 AM (48 w, 5 d)
Dec 12 2019
Dec 11 2019
Sorry @atanasyan, you already reviewed this, but for Mips64 tests would fail with -verify-machineinstrs option. Apparently both 'SLT' and 'SLT64' use GPR32 for result. It's been corrected now and there should be no issues for EXPENSIVE_CHECKS builds. Can you take a quick look at new changes? Thanks.
Dec 5 2019
Dec 4 2019
There is a trick we can do to avoid taking an additional register. We can reuse either OldVal or Incr for intermediate results. I know that return value needs to be same as OldVal but I don't know if changing Incr is allowed.
Nov 13 2019
Nov 12 2019
- Removed isReallyTriviallyReMaterializable and reMaterialize
Nov 6 2019
Oct 23 2019
Oct 17 2019
Oct 11 2019
Oct 10 2019
Tests would fail when we add -verify-machineinstrs option.
Oct 9 2019
Oct 8 2019
Oct 7 2019
Oct 3 2019
Simple use case if someone is unfamiliar with gpof and -pg options:
Oct 2 2019
Sep 26 2019
Sep 19 2019
Any comment on whether we should split this into two patches? One that adds MCTargetOptions to MCAsmInfo and another one that just fixes prefixes for Mips.
- MipsMCAsmInfo() now always reads ABI from MipsABIInfo instead of Triple.
Sep 18 2019
- 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.
Sep 6 2019
More detailed explanation follows:
Aug 28 2019
Changed Optional<const MCTargetOptions *> with const MCTargetOptions *
Aug 27 2019
- 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.