In current OpenCL implementation some options are set in OpenCL RT/Driver, which causes discrepancy between online and offline paths.
Implement infrastructure to move options from OpenCL RT/Driver to AMDGPUToolChain using overloaded TranslateArgs() method.
Create map for default options values, as Options.td doesn't support default values (in contrast with OPTIONS.def).
Add two driver options: -On and -mNN (like -O3, -m64).
Some minor formatting changes to follow the clang-format style.
Details
Diff Detail
Event Timeline
lib/Driver/ToolChains/AMDGPU.h | ||
---|---|---|
44 | Is it really needed to create map in the header? |
Several requested changes:
- move map initialization out of header file -- visually it looks better in .h file, but logically it should be in .cpp
- add assert() in getOptionDefault() -- check for unknown to OptionsDefault option
- combine args for OPT_O check
- use const StrinRef instead of std::string in the map and getOptionDefault() -- that eliminates conversion in AddJoinedArg()
- eliminate redundant brackets
ToDo:
- test
lib/Driver/ToolChains/AMDGPU.h | ||
---|---|---|
60 | That's how clang-format sees it: |
Is it really needed to create map in the header?