This is an archive of the discontinued LLVM Phabricator instance.

[ARM] Unified logic for computing target ABI.
AbandonedPublic

Authored by apazos on Jun 20 2017, 3:20 PM.

Details

Summary

Unified logic for computing target ABI in backend and front end by moving this common code to Support/TargetParser.

Modeled Triple::GNU after front end code (aapcs abi) and updated tests that expect apcs abi.

Removed assertion in backend to avoid different compiler behavior due to build mode.

Diff Detail

Event Timeline

apazos created this revision.Jun 20 2017, 3:20 PM
echristo added inline comments.Jun 21 2017, 2:33 PM
lib/Target/ARM/ARMTargetMachine.cpp
112–115

I think the flow I had before worked better. Anything that was passed in that was unrecognized should assert as the only way into this code should be via a tool that checks valid options and then we can check for empty and create a default one in that case.

apazos updated this revision to Diff 103507.Jun 21 2017, 6:14 PM

Restore assertion code.

echristo edited edge metadata.Jun 29 2017, 5:04 PM

I've gone ahead and committed something very similar thusly:
Committing to https://llvm.org/svn/llvm-project/llvm/trunk ...
M include/llvm/Support/TargetParser.h
M lib/Support/TargetParser.cpp
M lib/Target/ARM/ARMTargetMachine.cpp
M test/CodeGen/ARM/alloca.ll
M test/CodeGen/ARM/arm-abi-attr.ll
M test/CodeGen/ARM/ctor_order.ll
M test/CodeGen/ARM/ctors_dtors.ll
M test/CodeGen/ARM/ssp-data-layout.ll
M test/CodeGen/ARM/str_pre-2.ll
Committed r306768

I'm really sorry for the delay.

apazos abandoned this revision.Jul 5 2017, 12:51 PM

We can abandon this one now, thanks Eric!