- User Since
- Oct 23 2013, 8:22 AM (361 w, 1 d)
Jul 15 2020
address @lenary's comment, good catch! thanks a lot!!
address @asb's comment. thanks.
Jul 14 2020
This is normal behavior in current clang implementation,
-mcpu=? flag does not interact with any flags, it just print out the all of ProcessorModel registered in backend.
Jul 11 2020
Jul 10 2020
avoid to check compiler version in testcase
addess @asb 's comment.
Jul 9 2020
BTW, this patch depends on D77030, which aim to avoid the forcing of any ProcessorModel to have FeatureRVCHints feature.
But if we decide to keep the FeatureRVCHints, I need to change implementation a little.
May 6 2020
May 3 2020
address kito's comment
address @MaskRay's review feedback
May 2 2020
Apr 30 2020
rebase on master
address @lenary's review feedback
Apr 29 2020
@MaskRay Thanks for your suggestion and reminder.
- Rebase on master branch.
- update lld testcases
rebase on D78988
- Add empty combined module checking before call backend()
- Appling new approach, some testcasess need to updated and deleted. In checking module empty approach, it can suppress emitting optimzed empty combined module, but in new approach, it still emit combined module. I thought new approach behavior is acceptable. This case happend in linker-script-symbols-assign.ll.
- Delete llvm/test/ThinLTO/X86/empty-object.ll. I misunderstood -thinlto-distributed-indexes option meaning. I add this case just becasue becuase I modified llvm-lto2. I think testing in empty-module.ll is enough. This patch focus on empty combined module, I think we don't need to comfirm "empty ThinLTO module" still be emitted.
address @tejohnson's comments
Apr 28 2020
I'm very appreciate your help and comment,
because I'm not LTO expert, so if you have any good idea and concern in implementation
Please don't hesitate to correct me, thanks.
fixed linker-script-symbols-assign.ll, now lto would not generate empty module (%t2.lto.o)
fixed typo and format.
sorry, my fault, there are two failing tests I need to fix first.
Apr 19 2020
I plan to suppress to emit empty module or avoid ld to link empty module's object file.
Apr 16 2020
Could you add a testcase? It will helpful to see what issue fixed in this patch. thanks.
Apr 14 2020
Apr 13 2020
Apr 9 2020
I agree negative features is not intuitive, but HINT instruction default is legal and supported, in other words, it mean the disabling HINT instruction is a feature, right?
There were also negative features in other backend. (grep FeatureNo) so we are not first support it.
For sure, I won’t insist on doing this, I feel it's just a friendly trade-off between user and developer.
Apr 6 2020
@lenary (Sorry for the very late reply...)
update implementation and handle -mcpu with explicitly specified -march.
If -mcpu has default march, explicitly -march will overwrite it.
Mar 29 2020
Mar 26 2020
Mar 25 2020
Mar 24 2020
Jan 16 2020
I fixed bug here, but I'm not sure this small fixed should be another commit or not.
@lenary, do you have any suggestion?
Jan 15 2020
Jan 14 2020
This patch is necessary for enabling LTO
backend does this mismatch checking before getSubtargetImpl which reads the target-feature info from IR function attribute, and it will reset the target-abi if mismatching happen.
because I don't want to break this mismatch checking feature, so I move this checking later than getSubtargetImpl execution.
Jan 13 2020
I think putting the resetTargetDefaultOptions after instance of TargetMachine is too late.
ppc and mips compute the TargetABI in XXXXTargetMachine constructor. In addition , mips compute the DataLayout with target ABI in TargetMachine constructor.
Jan 12 2020
Could you please guide me and review this PoC?
or take a look at this [[ take a look at | maillist ]] thread?
Jan 9 2020
remote LTO related code.
this PoC include D70837 patch for generate correct code.
Jan 6 2020
I'd like to discuss what is good way to pass target-abi in maillist after I had a try to encoding ABI info into LLVM IR via module flag.
any suggestions are welcome, thanks.
Jan 5 2020
Dec 19 2019
The problem is how -mcpu interact with explicitly specified -march (or target features).
Dec 17 2019
I asked @kito-cheng about the GCC LTO behavior,
GCC LTO encodes the ABI info in elf and the behavior in above examples match to @efriedma 's responses.
So I think maybe encode ABI in module metadata flag is a good ideal.
Dec 11 2019
update missed code..
Dec 10 2019
Dec 6 2019
BTW, I used this patch and D71124 to run the CoreMark on HiFive unleashed with -O3 -mllvm -enable-misched -mllvm -enable-post-misched -mcpu=rocket-rv64,
the result is better than -O3 -mllvm -enable-misched -mllvm -enable-post-misched and get the performance 3.5% speedup (use ld.bfd and libgcc).
Dec 3 2019
Nov 29 2019
Nov 28 2019
add expected failed case, it fixed in https://reviews.llvm.org/D70837.
Nov 27 2019
Yes. Okay, agree with you.
Presumably the next steps are to work out how to pass -target-abi through to the LTO backend via attributes? I was trying to see how other backends did this, but I'm not sure. I think the right way may be to have a feature per ABI, like ARM does here: https://github.com/llvm/llvm-project/blob/2d739f98d8a53e38bf9faa88cdb6b0c2a363fb77/clang/lib/Driver/ToolChains/Arch/ARM.cpp#L313-L319
It might be worth sending an email to llvm-dev, asking for guidance.
Nov 26 2019
Nov 21 2019
Re-applied with test fix in https://reviews.llvm.org/rG4fccd383d571865321b4723b81c3042d2c15fd80
@lenary failed again,
I will setup windows platform to figure out what's going on.
Nov 19 2019
Nov 18 2019
rebase and fix failed testcases
Nov 15 2019
Nov 14 2019
I found RISCVABI::computeTargetABI will check ABI with target feature,
so when I apply this patch and enabling lto, the checking get failed and set ABI to ABI_Unknown.
It's not easy to fix it because target-features is per-function basis but ABI is not.