Displaying 20 results from an estimated 36 matches for "getdefaulttargettripl".
Did you mean:
getdefaulttargettriple
2015 Feb 12
3
[LLVMdev] Noop in sys::getDefaultTargetTriple()?
Hello,
I was looking at sys::getDefaultTargetTriple() (file:
lib/Support/Unix/Host.inc ) and there is something
unclear to me.
std::string sys::getDefaultTargetTriple() {
StringRef TargetTripleString(LLVM_DEFAULT_TARGET_TRIPLE);
std::pair<StringRef, StringRef> ArchSplit = TargetTripleString.split('-');
// Normalize the a...
2018 Jul 16
2
Target triple normalzation through the LLVM C API
Hello everyone,
First of all, this is my first posting here, so feel free to tell me if I'm asking the wrong questions in the wrong place.
I've discovered that the target triple normalization which used to be done at all times on sys::getDefaultTargetTriple() has been removed, due to the fact that most users of this function explicitly call Triple::normalize() on its result. This has however broken our compiler, which is built upon the LLVM C API, which relied on the default Windows target triple (x86_64-pc-win32 in our case) being normalized to x86_...
2018 Nov 27
2
ScalarEvolution class returns no valid loop exit count
...ers();
LoopInfoBase<BasicBlock, Loop> LIB;
LIB.releaseMemory();
LIB.analyze(DT);
for(auto&bb :*func){
Loop * L = LIB.getLoopFor(&bb);
if(L != nullptr){
AssumptionCache AC = AssumptionCache(*bb.getParent());
Triple MT(llvm::sys::getDefaultTargetTriple());
TargetLibraryInfoImpl TLII(MT);
TargetLibraryInfoWrapperPass TLI =
TargetLibraryInfoWrapperPass(TLII);
LoopInfo LI = LoopInfo(DT);
LI.analyze(DT);
*ScalarEvolution SE = ScalarEvolution(*func, TLI.getTLI(),AC,
DT, LI);*
B...
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 (target == nullptr) {
auto targets = llvm::TargetRegistry::targets();
size_t targetCount = 0;
for (auto const &...
2012 Nov 15
0
[LLVMdev] unable to interface with target machine
...mdev
>>
>> Sorry for not being specific enough - I meant in code.
>> I tried some clang functions to try to get the triplet using clang
>> functions but
>> it still caused the error.
>
> I suggest you take a look in include/llvm/Support/Host.h
>
I know about getDefaultTargetTriple().
What I don't know is how to get this information into the llvm::Module
so that it gets output with an llvm::raw_os_ostream in a way that clang
understands.
If I could use it with llvm-as without it having to make assumptions, to
build shared libraries and programs, that would be great...
2012 Nov 15
2
[LLVMdev] unable to interface with target machine
On 15/11/12 10:15, Philip Ashmore wrote:
> On 15/11/12 08:58, Duncan Sands wrote:
>>> Is there a way to get the target triple of the machine the code is running on,
>>> or barring that, the machine llvm was built on?
>>
>> clang -v
>>
>> Ciao, Duncan.
>> _______________________________________________
>> LLVM Developers mailing list
>>
2014 Aug 19
2
[LLVMdev] llvm::Triple support for haswell-enabled x86_64
Sounds good, I'll give it a try sooner or later. I've never messed with
triples, so is there anything I need to be aware of so I don't break any
code on other platforms? In particular, I want
llvm::sys::getDefaultTargetTriple() to return me this new haswell-aware
triple, so what do I need to do to ensure that I don't break anyone else
who is running one of these systems and previously had a different default
triple?
On Tue, Aug 19, 2014 at 4:53 PM, Jim Grosbach <grosbach at apple.com> wrote:
> Sure, go...
2012 Dec 26
3
[LLVMdev] Errors linking against libLLVMCore
...x86_64:
"std::string::copy(char*, unsigned long, unsigned long) const", referenced from:
llvm::sys::Path::makeUnique(bool, std::string*) in libLLVMSupport.a(Path.o)
"std::string::find(char const*, unsigned long, unsigned long) const", referenced from:
llvm::sys::getDefaultTargetTriple() in libLLVMSupport.a(Host.o)
.
.
.
Builds fine if I take out that line (the only line, so far) of LLVM code.
But code like this compiles fine:
std::string s = "Hello world";
std::printf("%s", s.c_str());
I figure I'm missing a lib, but I have no ide...
2016 Mar 23
2
Help with pass manager
...? here is my function
int moduleToObjectFile(llvm::Module *module, std::string &srcname, llvm::LLVMContext &Context) {
SMDiagnostic error;
Triple moduletriple = Triple(module->getTargetTriple());
if (moduletriple.getTriple().empty())
moduletriple.setTriple(sys::getDefaultTargetTriple());
std::string lookuperror;
const Target *moduletarget = TargetRegistry::lookupTarget(MArch, moduletriple, lookuperror);
if (!moduletarget) {
errs() << lookuperror;
return 1;
}
std::string cpuname = getCPUStr(),
ftrlist = ge...
2015 Sep 24
2
TargetTriple issue: LC_VERSION_MIN_MACOSX: Darwin kernel version vs SDK version
...show_bug.cgi?id=24927
Using the Xcode 7 linker, one gets messages such as the following when linking objects generated using llvm:
ld: warning: object file (foo.o) was built for newer OS X version (14.5) than being linked (10.9)
The issue is the following:
a) In lib/Support/Unix/Host.inc, sys::getDefaultTargetTriple() sets the OS name to darwin14.5 when running on MaxOS X 10.10. 14.5 is the Darwin kernel version as reported by uname.
b) In lib/CodeGen/AsmPrinter.cpp, AsmPrinter::doInitialization() writes out this version number to the LC_VERSION_MIN_MACOSX of the generated object.
c) The XCode 7 linker seem...
2016 Mar 24
2
Help with pass manager
...e(llvm::Module *module, std::string &srcname, llvm::LLVMContext &Context) {
>> SMDiagnostic error;
>> Triple moduletriple = Triple(module->getTargetTriple());
>>
>> if (moduletriple.getTriple().empty())
>> moduletriple.setTriple(sys::getDefaultTargetTriple());
>>
>> std::string lookuperror;
>> const Target *moduletarget = TargetRegistry::lookupTarget(MArch, moduletriple, lookuperror);
>>
>> if (!moduletarget) {
>> errs() << lookuperror;
>> return 1;
>> }...
2016 Mar 24
0
Help with pass manager
...nt moduleToObjectFile(llvm::Module *module, std::string &srcname, llvm::LLVMContext &Context) {
> SMDiagnostic error;
> Triple moduletriple = Triple(module->getTargetTriple());
>
> if (moduletriple.getTriple().empty())
> moduletriple.setTriple(sys::getDefaultTargetTriple());
>
> std::string lookuperror;
> const Target *moduletarget = TargetRegistry::lookupTarget(MArch, moduletriple, lookuperror);
>
> if (!moduletarget) {
> errs() << lookuperror;
> return 1;
> }
>
> std::string c...
2016 Mar 24
2
Help with pass manager
...;srcname, llvm::LLVMContext &Context) {
>>>> SMDiagnostic error;
>>>> Triple moduletriple = Triple(module->getTargetTriple());
>>>>
>>>> if (moduletriple.getTriple().empty())
>>>> moduletriple.setTriple(sys::getDefaultTargetTriple());
>>>>
>>>> std::string lookuperror;
>>>> const Target *moduletarget = TargetRegistry::lookupTarget(MArch, moduletriple, lookuperror);
>>>>
>>>> if (!moduletarget) {
>>>> errs() << lookupe...
2016 Mar 24
0
Help with pass manager
...le, std::string &srcname, llvm::LLVMContext &Context) {
>>> SMDiagnostic error;
>>> Triple moduletriple = Triple(module->getTargetTriple());
>>>
>>> if (moduletriple.getTriple().empty())
>>> moduletriple.setTriple(sys::getDefaultTargetTriple());
>>>
>>> std::string lookuperror;
>>> const Target *moduletarget = TargetRegistry::lookupTarget(MArch, moduletriple, lookuperror);
>>>
>>> if (!moduletarget) {
>>> errs() << lookuperror;
>>>...
2016 Mar 24
2
Help with pass manager
...) {
>>>>>> SMDiagnostic error;
>>>>>> Triple moduletriple = Triple(module->getTargetTriple());
>>>>>>
>>>>>> if (moduletriple.getTriple().empty())
>>>>>> moduletriple.setTriple(sys::getDefaultTargetTriple());
>>>>>>
>>>>>> std::string lookuperror;
>>>>>> const Target *moduletarget = TargetRegistry::lookupTarget(MArch, moduletriple, lookuperror);
>>>>>>
>>>>>> if (!moduletarget) {
>>...
2016 Mar 24
0
Help with pass manager
...Context &Context) {
>>>>> SMDiagnostic error;
>>>>> Triple moduletriple = Triple(module->getTargetTriple());
>>>>>
>>>>> if (moduletriple.getTriple().empty())
>>>>> moduletriple.setTriple(sys::getDefaultTargetTriple());
>>>>>
>>>>> std::string lookuperror;
>>>>> const Target *moduletarget = TargetRegistry::lookupTarget(MArch, moduletriple, lookuperror);
>>>>>
>>>>> if (!moduletarget) {
>>>>>...
2012 Dec 26
1
[LLVMdev] Proper values for LLVMCreateTargetMachine
I can't seem to get LLVMCreateTargetMachine to work on my box (MBP i7 OS X
10.8). What should the values of triple, cpu and features be? I'm just
looking for a way to get this up and going for now, I don't need specific
optimizations.
No matter what I send the function, I always get nil back. I'm giving it
LLVMGetFirstTarget as the target value.
Thanks for the help,
Timothy
2013 Feb 19
0
[LLVMdev] LLVM/Clang 3.1: Add a new include path in a clang C++ based parser
...lerInstance *TheCompInst = new CompilerInstance();
TheCompInst->getHeaderSearchOpts().AddPath(StringRef("/usr/include/opencv"),clang::frontend::Quoted ,false, true, false, false, false);
TheCompInst->createDiagnostics(0, 0);
TargetOptions TO;
TO.Triple = llvm::sys::getDefaultTargetTriple();
TargetInfo *TI =
TargetInfo::CreateTargetInfo(TheCompInst->getDiagnostics(), TO);
TheCompInst->setTarget(TI);
TheCompInst->createFileManager();
FileManager &FileMgr = TheCompInst->getFileManager();
TheCompInst->createSourceManager(FileMgr);
Sou...
2013 Feb 19
0
[LLVMdev] LLVM/Clang 3.1: Add a new include path in a clang C++ based parser
...lerInstance *TheCompInst = new CompilerInstance();
TheCompInst->getHeaderSearchOpts().AddPath(StringRef("/usr/include/opencv"),clang::frontend::Quoted ,false, true, false, false, false);
TheCompInst->createDiagnostics(0, 0);
TargetOptions TO;
TO.Triple = llvm::sys::getDefaultTargetTriple();
TargetInfo *TI =
TargetInfo::CreateTargetInfo(TheCompInst->getDiagnostics(), TO);
TheCompInst->setTarget(TI);
TheCompInst->createFileManager();
FileManager &FileMgr = TheCompInst->getFileManager();
TheCompInst->createSourceManager(FileMgr);
Sou...
2016 Mar 24
2
Help with pass manager
...SMDiagnostic error;
>>>>>>>> Triple moduletriple = Triple(module->getTargetTriple());
>>>>>>>>
>>>>>>>> if (moduletriple.getTriple().empty())
>>>>>>>> moduletriple.setTriple(sys::getDefaultTargetTriple());
>>>>>>>>
>>>>>>>> std::string lookuperror;
>>>>>>>> const Target *moduletarget = TargetRegistry::lookupTarget(MArch, moduletriple, lookuperror);
>>>>>>>>
>>>>>>&g...