search for: targetregistry

Displaying 20 results from an estimated 129 matches for "targetregistry".

2018 Jan 20
1
No Targets in TargetRegistry
This is from https://stackoverflow.com/questions/48360685/no-targets-in-targetregistry I have the following code, which should get the default llvm::Target. auto const targetTriple = llvm::sys::getDefaultTargetTriple(); llvm_module.setTargetTriple(targetTriple); std::string error; auto const * target = llvm::TargetRegistry::lookupTarget(targetTriple, error); if...
2011 Sep 18
1
[LLVMdev] Discrepancies in LLVM sources
...e don't make any sort of guarantee about that, and such a > guarantee is not necessary for correctness. Aren't values in Core.h supposed to be used by users of API and they should match enums, or what they are for then? What are they matched against? >> > Also, llvm/Support/TargetRegistry.h and llvm/Target/TargetRegistry.h >> > define two different version of some classes, particularly llvm::Target. >> > Fields with the same names have different offsets. >> > Are they intended to be different, and if yes, why? > llvm/Target/TargetRegistry.h does not...
2011 Sep 18
2
[LLVMdev] Discrepancies in LLVM sources
Looks like constants in include/llvm-c/Core.h aren't in sync with enums. For example, LLVMAdd is 8 in Core.h and llvm::Instruction::LLVMAdd evaluates to 9 in C++. Same for Cast Operators section and possibly in other places. Also, llvm/Support/TargetRegistry.h and llvm/Target/TargetRegistry.h define two different version of some classes, particularly llvm::Target. Fields with the same names have different offsets. Are they intended to be different, and if yes, why? All based on rev.139973. Also I got dropped from the mailing list on 9/15 -- no mess...
2011 Sep 18
0
[LLVMdev] Discrepancies in LLVM sources
...or example, LLVMAdd is 8 in Core.h and  llvm::Instruction::LLVMAdd > evaluates to 9 in C++. > Same for Cast Operators section and possibly in other places. Yes; we don't make any sort of guarantee about that, and such a guarantee is not necessary for correctness. > Also, llvm/Support/TargetRegistry.h and llvm/Target/TargetRegistry.h > define two different version of some classes, particularly llvm::Target. > Fields with the same names have different offsets. > Are they intended to be different, and if yes, why? llvm/Target/TargetRegistry.h does not exist on trunk. > All based on...
2011 Sep 08
2
[LLVMdev] Bug in TargetRegistry.h?
Hi, The code @ line 584 of TargetRegistry.h effectively suppresses specifying any AsmStreamer constructor function but stock createAsmStreamer one. Is it by intention or condition should be replaced with != ? Best regards, Max
2011 Sep 08
0
[LLVMdev] Bug in TargetRegistry.h?
On Thu, Sep 8, 2011 at 12:12 AM, Max Kazakov <max.kazakov at gmail.com> wrote: > Hi, > > The code @ line 584 of TargetRegistry.h effectively suppresses specifying any > AsmStreamer constructor function but stock createAsmStreamer one. Is it by > intention or condition should be replaced with != ? Hi Max, are you sure that you have the tip-of-tree version of include/llvm/Support/TargetRegistry.h? static void Regi...
2010 Dec 26
0
[LLVMdev] does TargetRegistry allocate heap memory?
Hi and merry X-Mas! At initialization I add some targets (e.g. LLVMInitializeX86TargetInfo()). Is this guaranteed not to allocate memory to prevent memory leaks? If you use llvm in a plug-in then it is possible to load and unload the plugin. As there is no way to clear the target registry and I do not see a "new" at the first glance I assume it does not allocate heap memory. Is this
2011 Sep 08
1
[LLVMdev] Bug in TargetRegistry.h?
Hi Ivan, Sorry for the confusion - in the latest version it is line 760: static void RegisterAsmStreamer(Target &T, Target::AsmStreamerCtorTy Fn) { if (T.AsmStreamerCtorFn == createAsmStreamer) T.AsmStreamerCtorFn = Fn; } Best regards, Max
2018 May 04
2
llvm-mc-assemble-fuzzer broken
...eference to type 'std::unique_ptr<MCCodeEmitter>' could not bind to an lvalue of type 'llvm::MCCodeEmitter *' UseDwarfDirectory, IP, CE, MAB, ShowInst)); ^~ /Users/davide/work/llvm-monorepo/llvm-project-20170507/llvm/include/llvm/Support/TargetRegistry.h:514:66: note: passing argument to parameter 'CE' here std::unique_ptr<MCCodeEmitter> &&CE, ^ /Users/davide/work/llvm-monorepo/llvm-project-20170507/llvm/tools/llvm-mc-assemble-fu...
2017 Oct 11
3
TargetRegistry and MC object ownership.
...er(); delete Assembler; } In the depths of a fever from a head-cold, I snapped. I've been hacking MC to convert these raw pointers (and worse: references!) to unique_ptrs (apologies to people whose backbends I've broken), but I hit a big blocker when I get to Target in "llvm/Support/TargetRegistry.h". Target vends MC objects by calling registered ctor functions. E.g.: MCAsmBackend *createMCAsmBackend(const MCRegisterInfo &MRI, StringRef TheTriple, StringRef CPU, const MCTargetOptions &Options) const { if (!MCA...
2010 Feb 24
1
[LLVMdev] getting C backend
Hi! is there a way to get the c backend using llvm::TargetRegistry::lookupTarget()? e.g. llvm::TargetRegistry::lookupTarget("c", error)? - Jochen
2018 May 05
0
llvm-mc-assemble-fuzzer broken
...std::unique_ptr<MCCodeEmitter>' could not > bind to an > lvalue of type 'llvm::MCCodeEmitter *' > UseDwarfDirectory, IP, CE, MAB, ShowInst)); > ^~ > /Users/davide/work/llvm-monorepo/llvm-project-20170507/llvm/include/llvm/Support/TargetRegistry.h:514:66: > note: passing argument to parameter 'CE' here > std::unique_ptr<MCCodeEmitter> &&CE, > ^ > /Users/davide/work/llvm-monorepo/llvm-project-20170507/llvm/tools/l...
2018 May 05
1
llvm-mc-assemble-fuzzer broken
...CCodeEmitter>' could not >> bind to an >> lvalue of type 'llvm::MCCodeEmitter *' >> UseDwarfDirectory, IP, CE, MAB, ShowInst)); >> ^~ >> /Users/davide/work/llvm-monorepo/llvm-project-20170507/llvm/include/llvm/Support/TargetRegistry.h:514:66: >> note: passing argument to parameter 'CE' here >> std::unique_ptr<MCCodeEmitter> &&CE, >> ^ >> /Users/davide/work/llvm-monorepo/llvm-project-20170...
2011 Jun 21
1
[LLVMdev] Instantiating a JIT on win64
...s actually X86_64-win64, via visual c++ compilation. I also had to fiddle around to get LLVM 2.9 to compile under the custom build system I'm working with). The JIT::selectTarget call infers a triple of "x86_64-pc-win32", which then fails to find a target machine. Interestingly, the TargetRegistry appears to be empty, which doesn't seem right (maybe i haven't linked in a library that populates this?). I also tried specifying MCPU as "X86_64"/"X86" and MArch as "win64"/"w64"/"win32" using EngineBuilder functions, which didn't help...
2011 May 04
0
[LLVMdev] Memory Subsystem Representation
...g about. Encoding it in metadata > would be inconvenient. I agree that metadata isn't the right way to go, but this argument doesn't fly at all with me. The whole point of these passes are to do target-specific optimizations. The right way to expose this sort of thing is with the new TargetRegistry interfaces. That said, speculatively adding target hooks isn't the right way to go, the client should come first. -Chris
2016 Mar 24
2
Help with pass manager
The stack trace: llvm::PMTopLevelManager::addImmutablePass(llvm::ImmutablePass*) llvm::PMTopLevelManager::schedulePass(llvm::Pass*) moduleToObjectFile(llvm::Module*,std::string&,llvm::LLVMContext&) Sometimes it doesn't crash because TargetRegistry::lookupTarget() returns an error which says it doesn't support the current target > On Mar 24, 2016, at 1:14 AM, Mehdi Amini <mehdi.amini at apple.com> wrote: > > Assuming you are talking about this line: > > passmanager.add(tliwp); > > I don't see anything ob...
2016 Mar 27
2
Undefined behaviour in command line parser
In these days I’ve integrated llc code into my compiler. I had an undefined behaviour because when cl::AddExtraVersionPrinter(TargetRegistry::printRegisteredTargetsForVersion) is called, the modules I give to the code in input to compile got somehow “corrupted" by this function. It is definitely an undefined behaviour because every debug I do, modules gets different changes, producing different assertions every run: - Target tripl...
2011 May 03
2
[LLVMdev] Memory Subsystem Representation
"Rotem, Nadav" <nadav.rotem at intel.com> writes: > Can you describe which passes may benefit from this information ? My > intuition is that until there are a number of passes which require > this information, there are other ways to provide this > information. One way would be to use Metadata. We have Cray-specific passes that use this information. Some of the
2016 Mar 24
2
Help with pass manager
...e*,std::string&,llvm::LLVMContext&) > > > Without mapping to line numbers this is not very helpful: moduleToObjectFile never calls schedulePass. > > Also you didn't answer my previous question about the crash. > > >> Sometimes it doesn't crash because TargetRegistry::lookupTarget() returns an error which says it doesn't support the current target > > Do you mean that running it multiple time does not always produce the same behavior in the call to lookupTarget? > That's unexpected and I'd be worried about my program. > > -- > M...
2016 Mar 24
0
Help with pass manager
...s*) > moduleToObjectFile(llvm::Module*,std::string&,llvm::LLVMContext&) Without mapping to line numbers this is not very helpful: moduleToObjectFile never calls schedulePass. Also you didn't answer my previous question about the crash. > Sometimes it doesn't crash because TargetRegistry::lookupTarget() returns an error which says it doesn't support the current target Do you mean that running it multiple time does not always produce the same behavior in the call to lookupTarget? That's unexpected and I'd be worried about my program. -- Mehdi > > On Mar 24,...