summaryrefslogtreecommitdiffstats
path: root/llvm/test/Transforms/AddDiscriminators/multiple.ll
diff options
context:
space:
mode:
authorDiego Novillo <dnovillo@google.com>2015-11-11 17:54:37 +0000
committerDiego Novillo <dnovillo@google.com>2015-11-11 17:54:37 +0000
commit0354a9f67bf1a13bbc6ad316b8b58717bf3d2c48 (patch)
tree404ed58ab1384c586194640b13f783664c33d34c /llvm/test/Transforms/AddDiscriminators/multiple.ll
parent0f40ea5dfe1132fff9e65c69bcd4ee50632ceb08 (diff)
downloadbcm5719-llvm-0354a9f67bf1a13bbc6ad316b8b58717bf3d2c48.tar.gz
bcm5719-llvm-0354a9f67bf1a13bbc6ad316b8b58717bf3d2c48.zip
SamplePGO - Fix PR 25482 - Do not rely on llvm.dbg.cu for discriminators
The discriminators pass relied on the presence of llvm.dbg.cu to decide whether to add discriminators, but this fails in the case where debug info is only enabled partially when -fprofile-sample-use is active. The reason llvm.dbg.cu is not present in these cases is to prevent codegen from emitting debug info (as it is only used for the sample profile pass). This changes the discriminators pass to also emit discriminators even when debug info is not being emitted. llvm-svn: 252763
Diffstat (limited to 'llvm/test/Transforms/AddDiscriminators/multiple.ll')
-rw-r--r--llvm/test/Transforms/AddDiscriminators/multiple.ll6
1 files changed, 5 insertions, 1 deletions
diff --git a/llvm/test/Transforms/AddDiscriminators/multiple.ll b/llvm/test/Transforms/AddDiscriminators/multiple.ll
index 949ae5c4093..9a05fcd8686 100644
--- a/llvm/test/Transforms/AddDiscriminators/multiple.ll
+++ b/llvm/test/Transforms/AddDiscriminators/multiple.ll
@@ -47,7 +47,11 @@ if.end: ; preds = %if.else, %if.then
attributes #0 = { nounwind uwtable "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "unsafe-fp-math"="false" "use-soft-float"="false" }
-!llvm.dbg.cu = !{!0}
+; We should be able to add discriminators even in the absence of llvm.dbg.cu.
+; When using sample profiles, the front end will generate line tables but it
+; does not generate llvm.dbg.cu to prevent codegen from emitting debug info
+; to the final binary.
+; !llvm.dbg.cu = !{!0}
!llvm.module.flags = !{!7, !8}
!llvm.ident = !{!9}
OpenPOWER on IntegriCloud