Displaying 20 results from an estimated 200 matches similar to: "[LLVMdev] Using Function Passes from Module Passes"
2015 Jun 22
2
[LLVMdev] How to Obtain a DataLayout Reference Given a Function & F
I’ve been debugging SAFECode source code files, and line 170 in ArrayBoundCheckLocal.cpp has been causing the following compilation error:
In file included from /Users/peterfinn/Desktop/llvm_trunk_2/projects/safecode/lib/ArrayBoundChecks/ArrayBoundCheckLocal.cpp:18:
In file included from
2008 Apr 07
2
[LLVMdev] Problem Linking Analysis Group
Dear All,
I'm having the following problem linking code that defines and uses an
AnalysisGroup.
I have an analysis group defined as follows:
class PoolAllocateGroup {
public:
static char ID;
virtual ~PoolAllocateGroup ();
virtual PA::FuncInfo *getFuncInfo(Function &F);
...
};
... which is then inherited by a ModulePass:
class PoolAllocate : public ModulePass , public
2011 Jan 22
2
[LLVMdev] Pointers in Load and Store
John,
I have looked at the SAFECode and thought following sould work
if (isa<Constant>(I.getOperand(0)))
{ Out << "*** operand 0 is a constant ******";
if (Instruction *operandI = dyn_cast<Instruction>(I.getOperand(0)))
{ Out << "********operand is an instruction ****";
if (GetElementPtrInst *gepI =
2016 Apr 27
3
ArrayBoundChecks in SafeCode-llvm37
Hi,
I am wondering if anyone could run ArrayBoundChecks located in
SafeCode-llvm37 (https://github.com/jtcriswell/safecode-llvm37) on
llvm-3.8?
Thanks.
Syed
--
Rafi
2009 Apr 14
3
[LLVMdev] SVN Head Error Building on Mac OS X
Dear All,
Has anyone else noticed the following problem building LLVM on Mac OS X:
find-cycles.pl: Circular dependency between *.a files:
find-cycles.pl: libLLVMAsmPrinter.a libLLVMCodeGen.a libLLVMSelectionDAG.a
llvm[1]: Building llvm-config script.
cat: /Users/criswell/box/x86/llvm22/tools/llvm-config/FinalLibDeps.txt:
No such file or directory
-- John T.
2011 Jan 22
0
[LLVMdev] Pointers in Load and Store
On 1/21/2011 10:46 PM, Surinder wrote:
> John,
>
> I have looked at the SAFECode and thought following sould work
>
> if (isa<Constant>(I.getOperand(0)))
> { Out<< "*** operand 0 is a constant ******";
> if (Instruction *operandI = dyn_cast<Instruction>(I.getOperand(0)))
> { Out<<
2011 Aug 28
0
[LLVMdev] How to break/iterate over nested instructions.
Dear Manish,
First, in answer to your original question: yes, there is a pass that
will convert constant expression GEPs used within LLVM instructions into
GEP instructions. SAFECode has a pass called BreakConstantGEPs in
safecode/trunk/lib/ArrayBoundChecks/BreakConstantGEPs.cpp
(http://llvm.org/viewvc/llvm-project/safecode/trunk/lib/ArrayBoundChecks/BreakConstantGEPs.cpp?view=log).
It
2009 Apr 14
0
[LLVMdev] SVN Head Error Building on Mac OS X
John Criswell wrote:
> Dear All,
>
> Has anyone else noticed the following problem building LLVM on Mac OS X:
>
> find-cycles.pl: Circular dependency between *.a files:
> find-cycles.pl: libLLVMAsmPrinter.a libLLVMCodeGen.a libLLVMSelectionDAG.a
> llvm[1]: Building llvm-config script.
> cat: /Users/criswell/box/x86/llvm22/tools/llvm-config/FinalLibDeps.txt:
> No such
2008 Feb 15
2
[LLVMdev] Possible Bad Assertion in Value.cpp
Dear All,
I'm getting the following assertion from a program I've written:
/home/vadve/criswell/src/llvm22/lib/VMCore/Value.cpp:57: virtual
llvm::Value::~Value(): Assertion `use_empty() && "Uses remain when a
value is destroyed!"' failed.
This occurs when I free a Module (the program uses an auto_ptr() to the
Module, and the auto_ptr() moves out of scope).
It
2011 Jan 23
1
[LLVMdev] Pointers in Load and Store
John,
I have looked at the real code (instead of the obsolete one) and it
appears to be easy to find if an operand is a getelementptr
instruction.
if (ConstantExpr * CE = dyn_cast<ConstantExpr>(I.getOperand(0)))
{ Out<< "*** operand 0 is a constant Expr******";
if (CE->getOpcode() == Instruction::GetElementPtr)
{ Out<< "*** operand 0 is
2007 Dec 18
2
[LLVMdev] Another Pass Manager Assertion
Dear All,
The attached code (which is a contrived test case) hits the following
assertion:
test:
/home/vadve/criswell/src/llvm22/include/llvm/PassAnalysisSupport.h:226:
AnalysisType& llvm::Pass::getAnalysisID(const llvm::PassInfo*,
llvm::Function&) [with AnalysisType = Pass1]: Assertion `ResultPass &&
"getAnalysis*() called on an analysis that was not "
2008 Feb 05
1
[LLVMdev] Problem Building llvm-gcc 4.2
Dear All,
I'm getting the following error building mainline llvm-gcc 4.2 (LLVM and
llvm-gcc are up to date):
cc1: /home/vadve/criswell/src/llvm22/lib/VMCore/Instructions.cpp:290:
void llvm::CallInst::init(llvm::Value*, llvm::Value*): Assertion
`(FTy->getNumParams() == 1 || (FTy->isVarArg() && FTy->getNumParams() ==
0)) && "Calling a function with bad
2008 Feb 15
0
[LLVMdev] Possible Bad Assertion in Value.cpp
On Feb 15, 2008, at 1:57 PM, John Criswell wrote:
> Dear All,
>
> I'm getting the following assertion from a program I've written:
>
> /home/vadve/criswell/src/llvm22/lib/VMCore/Value.cpp:57: virtual
> llvm::Value::~Value(): Assertion `use_empty() && "Uses remain when a
> value is destroyed!"' failed.
>
> This occurs when I free a Module
2008 Apr 07
0
[LLVMdev] Problem Linking Analysis Group
On Apr 7, 2008, at 1:54 PM, John Criswell wrote:
>
> /localhome/criswell/llvm22/projects/llvm-poolalloc/Debug/lib/
> libpoolalloc.so:
> undefined reference to `vtable for llvm::PoolAllocateGroup'
> Does anyone know what I might be doing wrong?
The usual answer, you need to define all virtual functions, in
particular, those in the PoolAllocateGroup hierarchy.
2009 Apr 14
1
[LLVMdev] SVN Head Error Building on Mac OS X
On Apr 14, 2009, at 8:53 AMPDT, John Criswell wrote:
> John Criswell wrote:
>> Dear All,
>>
>> Has anyone else noticed the following problem building LLVM on Mac
>> OS X:
>>
>> find-cycles.pl: Circular dependency between *.a files:
>> find-cycles.pl: libLLVMAsmPrinter.a libLLVMCodeGen.a
>> libLLVMSelectionDAG.a
>> llvm[1]: Building
2007 Dec 18
0
[LLVMdev] Another Pass Manager Assertion
On Dec 18, 2007, at 10:55 AM, John Criswell wrote:
> Dear All,
>
> The attached code (which is a contrived test case) hits the following
> assertion:
>
> test:
> /home/vadve/criswell/src/llvm22/include/llvm/PassAnalysisSupport.h:
> 226:
> AnalysisType& llvm::Pass::getAnalysisID(const llvm::PassInfo*,
> llvm::Function&) [with AnalysisType = Pass1]: Assertion
2011 Aug 19
1
[LLVMdev] Break operands into multiple instructions
Hi All,
I am creating an instrumentation pass using LLVM libraries. I am using clang++ (version 2.9) to compile cpp code into LLVM bit code. When I generate the llvm bit code using clang++ using -O3, I get many instances of instructions that look like the following.
br i1 icmp ne (i8* bitcast (i32 (i32)* @pthread_cancel to i8*), i8* null), label %bb23, label %bb25
Here three LLVM instructions
2011 Aug 27
4
[LLVMdev] How to break/iterate over nested instructions.
Hi Duncan,
Why to break?
I wish to analyse all the operands of getelemetptr instructions. For which I
iterate over the code and get the instruction of interest by
getopcode == getelementptr. But the getelementptrs in this form as in my
last mail are getting away from my pass. So i wish to break it. I have a
work around if breaking is not possible, but I think it may be a common
requirement by
2011 Jan 21
0
[LLVMdev] Pointers in Load and Store
On 1/20/2011 10:02 PM, Surinder wrote:
> When I compile C programs into llvm, it produces load instructions in
> two different flavours.
>
> (1) %8 = load i8** %bp, align 8
>
> (2) %1 = load i8* getelementptr inbounds ([4 x i8]* @.str, i64 0,
> i64 0), align 1
>
> I know that %bp in first case and the entire "getelementptr inbounds
> ([4 x i8]* @.str, i64
2011 Jan 21
2
[LLVMdev] Pointers in Load and Store
When I compile C programs into llvm, it produces load instructions in
two different flavours.
(1) %8 = load i8** %bp, align 8
(2) %1 = load i8* getelementptr inbounds ([4 x i8]* @.str, i64 0,
i64 0), align 1
I know that %bp in first case and the entire "getelementptr inbounds
([4 x i8]* @.str, i64 0, i64 0)" in second case can be obtained by
dump'ing I.getOperand(0)