As currently written, -target powerpcspe will enable SPE regardless of
disabling the feature later on in the command line. Instead, change
this to just set a default CPU to 'e500' instead of a generic CPU.
Details
- Reviewers
MaskRay - Group Reviewers
Restricted Project - Commits
- rG36eedfcb3cea: [PowerPC] Fix powerpcspe subtarget enablement in llvm backend
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
llvm/lib/Target/PowerPC/PPCSubtarget.cpp | ||
---|---|---|
129–132 | Why is this change needed? |
llvm/lib/Target/PowerPC/PPCSubtarget.cpp | ||
---|---|---|
129–132 | It sets the default CPU to e500, which allows doing 'llc -mtarget=powerpcspe foo.ll' instead of needing to specify -mattr=+spe as well, or -mcpu=e500, in order to get the SPE. It's the only way I found to default enable it on the subarch basis. If it's better to just make the SubArch a hint to clang, and remove this, that's fine as well, it just looks a little silly to see 'llc -mtarget=powerpcspe -mattr=+spe ...'. |
Clang 10.0.0 branch date is approaching. I cannot think of a better solution right now. Let's do this.
Why is this change needed?