diff options
author | Diego Novillo <dnovillo@google.com> | 2014-03-03 20:06:18 +0000 |
---|---|---|
committer | Diego Novillo <dnovillo@google.com> | 2014-03-03 20:06:18 +0000 |
commit | b56be645998ba11706b0b23dbfb8311f4fb06ca2 (patch) | |
tree | 53bad856029fc5be3a43e782e0b8dc8a0a992058 /clang/lib/CodeGen/BackendUtil.cpp | |
parent | ef78566162feaf4731f05b6661754ebc20156d34 (diff) | |
download | bcm5719-llvm-b56be645998ba11706b0b23dbfb8311f4fb06ca2.tar.gz bcm5719-llvm-b56be645998ba11706b0b23dbfb8311f4fb06ca2.zip |
Schedule discriminator pass.
This needs to modify a line table test to account for the new lexical
block created to hold the new discriminator value.
llvm-svn: 202754
Diffstat (limited to 'clang/lib/CodeGen/BackendUtil.cpp')
-rw-r--r-- | clang/lib/CodeGen/BackendUtil.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/BackendUtil.cpp b/clang/lib/CodeGen/BackendUtil.cpp index 809333aaa15..478993a9f0f 100644 --- a/clang/lib/CodeGen/BackendUtil.cpp +++ b/clang/lib/CodeGen/BackendUtil.cpp @@ -166,6 +166,11 @@ static void addSampleProfileLoaderPass(const PassManagerBuilder &Builder, PM.add(createSampleProfileLoaderPass(CGOpts.SampleProfileFile)); } +static void addAddDiscriminatorsPass(const PassManagerBuilder &Builder, + PassManagerBase &PM) { + PM.add(createAddDiscriminatorsPass()); +} + static void addBoundsCheckingPass(const PassManagerBuilder &Builder, PassManagerBase &PM) { PM.add(createBoundsCheckingPass()); @@ -246,6 +251,9 @@ void EmitAssemblyHelper::CreatePasses() { PMBuilder.DisableUnrollLoops = !CodeGenOpts.UnrollLoops; PMBuilder.RerollLoops = CodeGenOpts.RerollLoops; + PMBuilder.addExtension(PassManagerBuilder::EP_EarlyAsPossible, + addAddDiscriminatorsPass); + if (!CodeGenOpts.SampleProfileFile.empty()) PMBuilder.addExtension(PassManagerBuilder::EP_EarlyAsPossible, addSampleProfileLoaderPass); |