This flag is enabled by default in the driver when NDEBUG is set. It
is forwarded on the LLVMContext to discard all value names (but
GlobalValue) for performance purpose.
This an improved version of D18024
Paths
| Differential D18127
Remove compile time PreserveName in favor of a runtime cc1 -discard-value-names option ClosedPublic Authored by mehdi_amini on Mar 12 2016, 5:58 PM.
Details Summary This flag is enabled by default in the driver when NDEBUG is set. It This an improved version of D18024
Diff Detail Event Timelinemehdi_amini retitled this revision from to Remove compile time PreserveName in favor of a runtime cc1 -discard-value-names option. mehdi_amini updated this object. Comment Actions Change these tests to use %clang_cc1 rather than add all the messy regex to handle arguments losing names?
mehdi_amini edited edge metadata. Comment ActionsUse cc1 in the few tests that were relying on value names. Also add test/CodeGenCXX/discard-name-values.cpp to test the new cc1 flag. This revision is now accepted and ready to land.Mar 13 2016, 6:07 AM Comment Actions Interesting question going forwards: We usually try to make test cases
Revision Contents
Diff 50546 include/clang/Driver/CC1Options.td
include/clang/Frontend/CodeGenOptions.def
lib/CodeGen/CGBuilder.h
lib/CodeGen/CGCall.cpp
lib/CodeGen/CGExpr.cpp
lib/CodeGen/CodeGenFunction.cpp
lib/CodeGen/ModuleBuilder.cpp
lib/Driver/Tools.cpp
lib/Frontend/CompilerInvocation.cpp
test/CodeGen/mips-byval-arg.c
test/CodeGen/mips-vector-arg.c
test/CodeGen/mips-zero-sized-struct.c
test/CodeGen/mips64-class-return.cpp
test/CodeGen/mips64-padding-arg.c
test/CodeGenCXX/debug-info-class.cpp
test/CodeGenCXX/discard-name-values.cpp
test/CodeGenCXX/stack-reuse.cpp
|
s/Disable/Discard/