mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 11:13:28 +01:00
2ccb22f509
DWARF discriminators are used to distinguish multiple control flow paths on the same source location. When this happens, instructions across basic block boundaries will share the same debug location. This pass detects this situation and creates a new lexical scope to one of the two instructions. This lexical scope is a child scope of the original and contains a new discriminator value. This discriminator is then picked up from MCObjectStreamer::EmitDwarfLocDirective to be written on the object file. This fixes http://llvm.org/bugs/show_bug.cgi?id=18270. llvm-svn: 202752
41 lines
1.4 KiB
C++
41 lines
1.4 KiB
C++
//===-- Utils.cpp - TransformUtils Infrastructure -------------------------===//
|
|
//
|
|
// The LLVM Compiler Infrastructure
|
|
//
|
|
// This file is distributed under the University of Illinois Open Source
|
|
// License. See LICENSE.TXT for details.
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
//
|
|
// This file defines the common initialization infrastructure for the
|
|
// TransformUtils library.
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
#include "llvm/InitializePasses.h"
|
|
#include "llvm-c/Initialization.h"
|
|
#include "llvm/PassRegistry.h"
|
|
|
|
using namespace llvm;
|
|
|
|
/// initializeTransformUtils - Initialize all passes in the TransformUtils
|
|
/// library.
|
|
void llvm::initializeTransformUtils(PassRegistry &Registry) {
|
|
initializeAddDiscriminatorsPass(Registry);
|
|
initializeBreakCriticalEdgesPass(Registry);
|
|
initializeInstNamerPass(Registry);
|
|
initializeLCSSAPass(Registry);
|
|
initializeLoopSimplifyPass(Registry);
|
|
initializeLowerInvokePass(Registry);
|
|
initializeLowerSwitchPass(Registry);
|
|
initializePromotePassPass(Registry);
|
|
initializeUnifyFunctionExitNodesPass(Registry);
|
|
initializeInstSimplifierPass(Registry);
|
|
initializeMetaRenamerPass(Registry);
|
|
}
|
|
|
|
/// LLVMInitializeTransformUtils - C binding for initializeTransformUtilsPasses.
|
|
void LLVMInitializeTransformUtils(LLVMPassRegistryRef R) {
|
|
initializeTransformUtils(*unwrap(R));
|
|
}
|