Displaying 20 results from an estimated 40000 matches similar to: "[LLVMdev] get file name"
2008 Nov 18
2
[LLVMdev] getModuleIdentifier() returns <stdin>
Hi all,
I'm writing my own pass and use "opt" to launch it. In my pass, I'd like to
see the name of the module I'm working on, so I use getModuleIdentifier(),
trying to get the name such as "test.bc." But the result is always <stdin>.
Could anyone please help me on this?
Thank you very much.
Jack
-------------- next part --------------
An HTML attachment
2008 Nov 18
0
[LLVMdev] getModuleIdentifier() returns <stdin>
Jack Tzu-Han Hung wrote:
> Hi all,
>
> I'm writing my own pass and use "opt" to launch it. In my pass, I'd like to see the name of the module I'm working on, so I use getModuleIdentifier(), trying to get the name such as "test.bc." But the result is always <stdin>.
>
> Could anyone please help me on this?
>
Is opt reading the input bitcode
2011 Jul 07
0
[LLVMdev] Filename in dynamically loaded function pass
On 7 July 2011 02:27, Kodakara, Sreekumar V
<sreekumar.v.kodakara at intel.com> wrote:
> I would like to know if there is an API/method that I can use to get the
> name of the file being processed in a dynamically loaded function pass. In
> other words, if I invoke a pass as follows
>
> opt -load pass.so -hello src.bc –o src.hello.bc
>
> where pass.so is a
2008 Nov 18
3
[LLVMdev] getModuleIdentifier() returns <stdin>
Hi John,
I run my pass this way:
opt -mypass <input.bc >output.bc
So I think "input.bc" is what I should expect, right?
Thanks,
Jack
On Tue, Nov 18, 2008 at 10:23 AM, John Criswell <criswell at cs.uiuc.edu>wrote:
> Jack Tzu-Han Hung wrote:
> > Hi all,
> >
> > I'm writing my own pass and use "opt" to launch it. In my pass, I'd like
2011 Jul 07
2
[LLVMdev] Filename in dynamically loaded function pass
Hi All,
I would like to know if there is an API/method that I can use to get the name of the file being processed in a dynamically loaded function pass. In other words, if I invoke a pass as follows
opt -load pass.so -hello src.bc -o src.hello.bc
where pass.so is a functionpass, I would like to get the filename "src.bc", in the doInitialization/doFinalization method. My intent is to
2006 Sep 25
2
[LLVMdev] Name of Function's original module during link-time optimization
Hi,
Reid Spencer wrote:
> Call getBytecodeModuleProvider (see Reader.h).
The problem is that one needs to provide the filename of the original
module as the argument of getBytecodeModuleProvider, whereas this is
unknown (it's exactly what we're trying to find out).
But, by looking where this method is called in the original bytecode
loading process, I figured out a way to set the
2012 Jun 01
0
[LLVMdev] [llvm-commits] [PATCH] Allow per-thread re-direction of outs()/errs()
On Thu, May 31, 2012 at 10:21 PM, Justin Holewinski <
justin.holewinski at gmail.com> wrote:
> On Thu, May 31, 2012 at 8:06 PM, Chris Lattner <clattner at apple.com> wrote:
>
>>
>> On May 31, 2012, at 2:39 PM, Justin Holewinski wrote:
>>
>> > The attached patch add the ability to programmatically re-direct
>> outs()/errs() to an arbitrary
2016 Jul 07
2
ObjectCache and getFunctionAddress issue
Hi all,
I'm trying to add pre-compiled object cache to my run-time.
I've implemented the object cache as follow:
class EngineObjectCache : public llvm::ObjectCache {
private:
std::unordered_map<std::string, std::unique_ptr<llvm::MemoryBuffer>>
CachedObjs;
public:
virtual void notifyObjectCompiled(const llvm::Module *M,
llvm::MemoryBufferRef Obj) {
auto id =
2020 Feb 06
3
[Release-testers] [10.0.0 Release] Release Candidate 1 is here
On Wed, Feb 5, 2020 at 9:30 PM Anil Mahmud <anil.mahmud.llvm at gmail.com> wrote:
>
> The following error was found when running test-release.sh on Red Hat 7.4
>
> ********************
> FAIL: LLVM :: tools/llvm-ar/quick-append.test (53100 of 59657)
> ******************** TEST 'LLVM :: tools/llvm-ar/quick-append.test' FAILED ********************
[...]
>
2018 Mar 31
4
Writing tests with Filecheck without emitting output to stdin
Hello
I have pass operating on bitcode file which produces more than one
equivalent representation.
opt --my-pass <%s | Filecheck %s
--my-pass generates files a.rpt b.rpt c.rpt . How do i write test without
writing all 3 files to stdin.
I have considered CHECK-LABEL for each. it creates bulky checks.
Thanks
Mahesh
-------------- next part --------------
An HTML attachment was
2011 Apr 05
0
[LLVMdev] inserting a print statement into IR
On 4/4/2011 6:26 PM, George Baah wrote:
> Hi Everyone,
> I am trying to construct the print statement : printf("value:%d\n",
> value);
> This is my llvm code. It is seg faulting at
> builder.CreateGlobalStringPtr(str,"").
This might be easier to debug with a stack trace. Use a debugger to see
the call stack when the segfault occurs. Also try to isolate
2010 Feb 12
2
[LLVMdev] Portable I/O
I'm attempting to use file I/O across platforms from LLVM assembly using the standard GNU C library: fprintf(), stdin/stdout, etc. Ideally I'd like to simply provide a single bitcode file that could be compiled on each platform, but because the internals of the I/O on each platform is different, this is not currently workable.
So my question is this: How do you suggest doing I/O in a
2018 Mar 31
3
Writing tests with Filecheck without emitting output to stdin
That works. Thanks.
One more followup question though.
Once i run opt on bitcode, there is not useful output/transform on bitcode.
this rpt files are extra.
I am hoping to do something like this,
; RUN: FileCheck --input-file=a.rpt.gold --check-prefix=CHECK-A < a.rpt
; RUN: FileCheck --input-file=b.rpt.gold --check-prefix=CHECK-B < b.rpt
i did not find much examples in tests hence
2018 Apr 01
0
Writing tests with Filecheck without emitting output to stdin
See: http://llvm.org/docs/CommandGuide/FileCheck.html
It is not required to pipe output to FileCheck; there is the --input-file option, which allows you to run FileCheck on an existing disk file. Something like this:
FileCheck %s --input-file a.rpt --check-prefix=A
FileCheck %s --input-file b.rpt --check-prefix=B
FileCheck %s --input-file c.rpt --check-prefix=C
If there are common parts to each
2012 Oct 04
2
[LLVMdev] question
That's because instructions have a location associated with them, not
a compile unit.
-eric
On Thu, Oct 4, 2012 at 12:46 PM, George Baah <georgebaah at gmail.com> wrote:
> I used DILocation instead of DICompileUnit and it works. Hmmm, interesting.
>
> George
>
> On Thu, Oct 4, 2012 at 1:33 AM, George Baah <georgebaah at gmail.com> wrote:
>>
>> Here is
2011 Apr 05
2
[LLVMdev] inserting a print statement into IR
This is the seg fault I am getting.
dyld: lazy symbol binding failed: Symbol not found:
__ZN4llvm13IRBuilderBase18CreateGlobalStringEPKcRKNS_5TwineE
Referenced from:
/Users/georgebaah/llvm_dir/llvm-2.8/Debug+Asserts/lib/LLVMArrayBoundsCheck.dylib
Expected in: flat namespace
dyld: Symbol not found:
__ZN4llvm13IRBuilderBase18CreateGlobalStringEPKcRKNS_5TwineE
Referenced from:
2019 Jul 29
3
Arguments name IR LLVM
On Mon, Jul 29, 2019 at 4:39 AM Hans Wennborg via llvm-dev <
llvm-dev at lists.llvm.org> wrote:
> The arguments are unnamed, which means they will be implicitly named %0,
> %1, %2.
>
OP's use case for the names aside, I think we should consider changing
LLVM's IR printer to print unnamed arguments in function definitions as %0,
%1, etc, like we do for instructions. We can
2012 Oct 05
1
[LLVMdev] question
You should probably think of the DIFooBar constructors like reinterpret-casts, not
"go find the thing I actually want" functions. If you hand DICompileUnit() a node
that is not a compile-unit metadata node, it's not going to tell you that you goofed.
If you _did_ have a CU metadata node, then DICompileUnit's getDirectory() would
work just fine. But you don't.
--paulr
2012 Oct 05
0
[LLVMdev] question
Hmmm, but it has a getDirectory function.
-G
On Thu, Oct 4, 2012 at 3:50 PM, Eric Christopher <echristo at gmail.com> wrote:
> That's because instructions have a location associated with them, not
> a compile unit.
>
> -eric
>
> On Thu, Oct 4, 2012 at 12:46 PM, George Baah <georgebaah at gmail.com> wrote:
> > I used DILocation instead of DICompileUnit and
2011 Apr 05
3
[LLVMdev] inserting a print statement into IR
Hi Everyone,
I am trying to construct the print statement : printf("value:%d\n",
value);
This is my llvm code. It is seg faulting at
builder.CreateGlobalStringPtr(str,"").
Thanks.
George
vector<const Type *> params;
params.push_back(Type::getInt8PtrTy(M.getContext()));
FunctionType *fType =
FunctionType::get(Type::getInt32Ty(M.getContext()), params, true);
Constant