Displaying 20 results from an estimated 33 matches for "gettriple".
2019 Mar 25
2
Trying to create a pure LLVM toolchain on musl based distribution
...d crtendS.o without --nostdlib or --nostartfiles but
> using these options will also not add the other crt*.o files that you
> may be expecting.
>
> There is a line in lib/Driver/Toolchains/Gnu.cpp which the Linux driver uses:
> const bool HasCRTBeginEndFiles =
> ToolChain.getTriple().hasEnvironment() ||
> (ToolChain.getTriple().getVendor() != llvm::Triple::MipsTechnologies);
> It looks like Musl may need to be included there?
I'll have a look, I don't know much the lowest part of the toolchain
build process so I don't understand very much what's...
2016 Mar 23
2
Help with pass manager
...reaches add() method of the pass manager.
Can you help me figuring out what’s the problem please? 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() <<...
2013 Jan 07
0
[LLVMdev] How to output a .S *and* a .OBJ file?
...gistered targets.
InitializeAllTargets();
InitializeAllAsmPrinters();
InitializeAllAsmParsers();
Triple *TheTriple = NULL;
if ( DoMingw ) {
TheTriple = new Triple("i686-pc-mingw32");
} else {
TheTriple = new Triple("i686-pc-win32");
}
Assert(!TheTriple->getTriple().empty()) //TheTriple.setTriple(sys::getHostTriple());
9 std::string Err;
const Target *TheTarget = TargetRegistry::lookupTarget(TheTriple->getTriple(), Err);
if (TheTarget == 0) {
printf( "Error selecting target\n" );
return false;
}
/*
CodeGenOpt::None
CodeGenO...
2016 Mar 24
2
Help with pass manager
...n you help me figuring out what’s the problem please? 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);...
2016 Mar 24
0
Help with pass manager
...ass manager.
> Can you help me figuring out what’s the problem please? 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 (!...
2016 Mar 24
2
Help with pass manager
...oblem please? 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::...
2016 Mar 24
0
Help with pass manager
...ng out what’s the problem please? 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, modu...
2016 Mar 24
2
Help with pass manager
...t;>>>>
>>>>>>
>>>>>> 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;
>>>>>>...
2016 Mar 24
0
Help with pass manager
...s 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 *modulet...
2016 Mar 24
2
Help with pass manager
...>>>>>
>>>>>>>> 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...
2016 Mar 24
0
Help with pass manager
...t;
>>>>>>>
>>>>>>> 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;
>&g...
2016 Mar 24
0
Help with pass manager
...>>
>>>>>>>>> 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());
>>>>>>>>>
>>>>>>>>...
2016 Mar 24
2
Help with pass manager
...t;>>>>>>>>> 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());
>>>>>>>>>>
>>>>...
2013 Aug 22
0
[LLVMdev] [RFC PATCH] X32 ABI support for Clang/compiler-rt (Clang patch)
...: Joined<["-"], "mabi=">, Group<m_Group>;
def march_EQ : Joined<["-"], "march=">, Group<m_Group>;
--- ./tools/clang/lib/Driver/Driver.cpp.orig
+++ ./tools/clang/lib/Driver/Driver.cpp
@@ -1700,6 +1700,9 @@ static llvm::Triple computeTargetTriple(StringRef
DefaultTargetTriple,
if (Target.getArch() == llvm::Triple::ppc)
Target.setArch(llvm::Triple::ppc64);
}
+ } else if (Args.getLastArg(options::OPT_mx32)) {
+ if (Target.getArch() == llvm::Triple::x86_64)
+ Target.setEnvironment(llvm::Triple::GNUX32);
}...
2019 Mar 25
3
Trying to create a pure LLVM toolchain on musl based distribution
Hello,
I'm trying to create a pure LLVM toolchain (that will not depend on GNU
and produce GNU-free code too) on a musl based distribution.
For now, I use gcc to bootstrap and build all LLVM components. I do it
individually because I was running out of space and memory trying to
build all using LLVM_ENABLE_PROJECTS. Also, I don't want to create a
all-in-one package. Then, once
2016 Mar 24
0
Help with pass manager
...t;>>>>>>> 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());
>>>>>>>>>>>...
2016 Mar 30
1
Help with pass manager
...t;>>>>> 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());
>>>>>>>>>&g...
2013 Aug 22
7
[LLVMdev] [RFC PATCH] X32 ABI support for Clang/compiler-rt
Hi,
I'm working on bringing up complete coverage for a Gentoo x32 "desktop"
system. I've been cooking up quite a few patches for various packages
to push upstream, but right now, the biggest blocker is the lack of
support for building with/codegen targeting x32 in llvm/clang. Since
the x32 patches were sent last year, I see support code has landed in
LLVM, and basic handling of
2013 Aug 22
3
[LLVMdev] [NEW PATCH] X32 ABI support for Clang/compiler-rt (Clang patch)
...DefineStd(Builder, "i386", Opts);
}
@@ -3013,20 +3021,31 @@
class X86_64TargetInfo : public X86TargetInfo {
public:
X86_64TargetInfo(const llvm::Triple &Triple) : X86TargetInfo(Triple)
{
- LongWidth = LongAlign = PointerWidth = PointerAlign = 64;
+ const bool IsX32 = (getTriple().getEnvironment() ==
llvm::Triple::GNUX32);
+ LongWidth = LongAlign = PointerWidth = PointerAlign = IsX32 ? 32 :
64;
LongDoubleWidth = 128;
LongDoubleAlign = 128;
LargeArrayMinWidth = 128;
LargeArrayAlign = 128;
SuitableAlign = 128;
- IntMaxType = SignedLong;
- UI...
2014 Jul 02
6
[LLVMdev] Upstreaming x32 ABI support
...2 are
already there)
* Michael Liao work done ~2 years ago and available here:
http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20120604/058450.html
What’s currently in trunk:
* Triplet x86_64-*-linux-gnux32 (command line support, EnvironmentType
enum to differentiate x32 from x86_64 by getTriple().getEnvironment()
== llvm::Triple::GNUX32)
https://github.com/llvm-mirror/llvm/commit/9dd2a3b1f2c253e20262535bb89b1ab6cc680ece
* ILP32/LP64 differentiation for TargetMachine
https://github.com/llvm-mirror/llvm/commit/a5597f0eaf1f93c6d0bc641a0cc54ecffb33955a
* LEA tuning:
https://github.com/llvm-mi...