Displaying 20 results from an estimated 648 matches for "targetmachine".
2011 Dec 02
2
[LLVMdev] deglobalizing TargetOptions
I'm running LLVM under threadsanitizer
(http://code.google.com/p/data-race-test/) to find and remove races in
a larger program that uses LLVM as a library. One of the things that I
found is that the TargetOptions are all global; you could create a
TargetMachine targeting ARM and X86 in two threads, but they both have
to share the same FloatABIType setting.
This is silly, and I plan to fix it by moving all the globals in
TargetOptions into getters and setters on TargetMachine. This means
that the TargetMachine object is going to get a bit bigger to
accomm...
2016 Sep 14
4
setDataLayout segfault
...setEngineKind(llvm::EngineKind::JIT);
engineBuilder.setOptLevel(llvm::CodeGenOpt::Aggressive);
engineBuilder.setErrorStr(&mcjit_error);
llvm::TargetOptions targetOptions;
targetOptions.AllowFPOpFusion = llvm::FPOpFusion::Fast;
engineBuilder.setTargetOptions( targetOptions );
TargetMachine *targetMachine = engineBuilder.selectTarget();
assert(targetMachine && "failed to create target machine");
std::cout <<
targetMachine->createDataLayout().getStringRepresentation() << "\n";
Mod.get()->setDataLayout(
targetMachine->create...
2014 Jan 26
2
[LLVMdev] [llmdev] fail to process llvm generated assembly on windows/mingw32
Hello guys,
I'm using llvm 3.3 on windows with mingw (triple: "i386-unknown-mingw32")
to compile IR code that my
program generates.
I do it in two phases: first I emit assembly code and then assemble it.
TargetMachine targetMachine =
target.createTargetMachine(triple);
targetMachine.setAsmVerbosityDefault(true);
targetMachine.setFunctionSections(true);
targetMachine.setDataSections(true);
targetMachine.getOptions().setNoFramePointerElim(true);
output.reset();
targ...
2017 Dec 15
4
RFC: Exposing TargetTransformInfo factories from TargetMachine
On Fri, Dec 15, 2017 at 5:30 AM, Hal Finkel <hfinkel at anl.gov> wrote:
> Are there reasons why we might not want to do this? Other options we should
> consider?
It does make the TargetMachine -> TargetIRAnalysis path less abstract,
but given that all targets have the same pattern of instantiating a
TargetIRAnalysis with a Function->TargetTransformInfo hook, the
abstraction does not seem particularly useful.
I might do even a simpler form of the patch though -- instead of
returnin...
2013 Dec 06
3
[LLVMdev] [RFC] CGContext skeleton implementation
...h) -> TargetTransformInfo
> (dynamic call) -> X86TTI
> (links with) -> X86Subtarget
>
> I was thinking of directly replacing X86Subtarget as such:
>
> IR Transform
> (links with) -> TargetTransformInfo
> (dynamic call) -> X86TTI
> (links with) -> TargetMachine
> (provides) -> CGContext
>
> So CGContext could still live inside libTarget. CGContext would be
> initialized for a Function based on the attributes and the information
> already in its container, TargetMachine.
>
> It sounds like you would be making CGContext part of l...
2011 Dec 02
2
[LLVMdev] deglobalizing TargetOptions
...t;
>> I'm running LLVM under threadsanitizer
>> (http://code.google.com/p/data-race-test/) to find and remove races in
>> a larger program that uses LLVM as a library. One of the things that I
>> found is that the TargetOptions are all global; you could create a
>> TargetMachine targeting ARM and X86 in two threads, but they both have
>> to share the same FloatABIType setting.
>>
>> This is silly, and I plan to fix it by moving all the globals in
>> TargetOptions into getters and setters on TargetMachine. This means
>> that the TargetMachine o...
2011 Dec 02
0
[LLVMdev] deglobalizing TargetOptions
..., Nick Lewycky wrote:
> I'm running LLVM under threadsanitizer
> (http://code.google.com/p/data-race-test/) to find and remove races in
> a larger program that uses LLVM as a library. One of the things that I
> found is that the TargetOptions are all global; you could create a
> TargetMachine targeting ARM and X86 in two threads, but they both have
> to share the same FloatABIType setting.
>
> This is silly, and I plan to fix it by moving all the globals in
> TargetOptions into getters and setters on TargetMachine. This means
> that the TargetMachine object is going to g...
2015 Mar 21
3
[LLVMdev] API Changes: TargetMachine::getSubtarget
Hi all,
As of r232885 I've removed the argument-less TargetMachine::getSubtarget
and TargetMachine::getSubtargetImpl. For the targets that aren't completely
independent of this I've gone ahead and left a non-virtual version of the
function in the target specific TargetMachine. What this means in practice
is that those targets can only use a bare getSubtarg...
2015 Jun 24
3
[LLVMdev] DataLayout
Hi all,
We have multiple DataLayout object in flight during a compilation: at least the one owned by the Module and the one owned by the TargetMachine.
There are two issues:
1) What if they differ? I guess we could assert at the beginning of CodeGen.
2) The DataLayout has internal mutable state (a cache of StructLayout).
The latter is my current concern: the cache in DataLayout is based on Type pointer which means that is has to be Context spec...
2013 Oct 14
2
[LLVMdev] [RFC] CodeGen Context
...at 1:55 AM, Bill Wendling <isanbard at gmail.com> wrote:
>
>> CGContext ::
>>
>> A central repository for back-end objects. The back-end objects may change, so
>> they should not be "cached" by individual passes. This is analogous to the
>> current TargetMachine object. The term "CGContext" is used because it
>> separates the current implementation from the "ideal" implementation.
>
> I’m pretty strongly opposed to introducing this new CGContext thing. We already have TargetMachine to collect all the target-specific inform...
2013 Dec 06
0
[LLVMdev] [RFC] CGContext skeleton implementation
...-> TargetTransformInfo
> (dynamic call) -> X86TTI
> (links with) -> X86Subtarget
>
> I was thinking of directly replacing X86Subtarget as such:
>
> IR Transform
> (links with) -> TargetTransformInfo
> (dynamic call) -> X86TTI
> (links with) -> TargetMachine
> (provides) -> CGContext
>
> So CGContext could still live inside libTarget. CGContext would be
> initialized for a Function based on the attributes and the information already in its container, TargetMachine.
>
> It sounds like you would be making CGContext part of libC...
2013 Oct 14
0
[LLVMdev] [RFC] CodeGen Context
...g <isanbard at gmail.com> wrote:
>>
>>> CGContext ::
>>>
>>> A central repository for back-end objects. The back-end objects may change, so
>>> they should not be "cached" by individual passes. This is analogous to the
>>> current TargetMachine object. The term "CGContext" is used because it
>>> separates the current implementation from the "ideal" implementation.
>>
>> I’m pretty strongly opposed to introducing this new CGContext thing. We already have TargetMachine to collect all the target-spe...
2017 Dec 15
2
RFC: Exposing TargetTransformInfo factories from TargetMachine
...ike:
FunctionAnalysisManager DummyFAM;
TTI = TIRA.run(F, DummyFAM);
return *TTI;
which isn't ideal.
Given that all in-tree backends have a factory function to directly
construct a TargetTransformInfo implementation anyway, what do you
think about exposing said factory function from the TargetMachine
subclasses directly? Something conceptually like this
https://reviews.llvm.org/D41268 but for all backends and will less
std::function?
[0]: XLA is a machine learning focussed linear algebra compiler
https://www.tensorflow.org/performance/xla/ that uses LLVM for its CPU
and GPU backends.
-- San...
2013 Dec 06
0
[LLVMdev] [RFC] CGContext skeleton implementation
...get some feedback.
>
> Hi Dan,
>
> This basic idea makes sense to me. It is consistent with my understanding of Bill's proposal. What I don't understand is why CGContext is tied to to CodeGen objects and initialized at ISelLowering. We should be able to get a CGContext from a TargetMachine by providing a Function.
>
> IR passes like the LoopVectorizer and LSR also require subtarget information. This was formalized by TargetTransformInfo. Now any pass using TargetTransformInfo needs to respect the current Function attributes, which means reinitializing subtarget info. I also th...
2009 Mar 08
2
[LLVMdev] addPassesToEmitFile
Hi,
Long time ago (llvm-svn june 2008) I asked here about a way to output
the assembly code of my JIT generated code to a string, so I could use
it to read it on the screen. I came up with this solution:
std::string Err;
const llvm::TargetMachineRegistry::entry* _arch =
llvm::TargetMachineRegistry::getClosestTargetForJIT(Err);
std::string FeaturesStr;
llvm::TargetMachine* target(_arch->CtorFn(*_module, FeaturesStr));
assert(target && "Could not allocate target machine!");
std::ostringstream os;
ta...
2015 Sep 17
6
The Trouble with Triples
...s been replaced by TargetTuple then TargetTuple must be serializable in the IR somehow.
Hopefully, we are agreed so far. Let's assume for the rest of this explanation that Phases 1-6 are complete and we now have const TargetTuple throughout the API. I'd like to draw particular attention to TargetMachine which, like everything else, has had its Triple member (called TargetTriple) replaced with a TargetTuple member (named TheTargetTuple). This member is used in all the same ways it used to be used when it was a Triple (named TargetTriple).
At this point, in the MC layer we have a number of classes...
2008 May 28
1
[LLVMdev] Asm output while executing
...executed.
I face a problem, which is clear from the error, although I have no
clue on how to do it otherwise.
If generating the code for its asm output and then for jit execution I get:
**********
static llvm::MachineFunction& llvm::MachineFunction::construct(const
llvm::Function*, const llvm::TargetMachine&): Assertion
`Fn->getAnnotation(MF_AID) == 0 && "Object already exists for this
function!"' failed.
**********
The code I use:
/// The asm code output
std::string Err;
const llvm::TargetMachineRegistry::entry* MArch =
llvm::TargetMachineR...
2016 Sep 09
2
[PATCH 1/3] appveyor: include opus.dll and opus.exp files if available
Using -i should prevent failing if the files don't exist.
---
appveyor.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/appveyor.yml b/appveyor.yml
index c85b0b1..ad9c6c0 100644
--- a/appveyor.yml
+++ b/appveyor.yml
@@ -17,7 +17,7 @@ build:
verbosity: minimal
after_build:
-- cmd: 7z a opus.zip win32\VS2015\%PLATFORM%\%CONFIGURATION%\opus.lib include\*.h
+- cmd: 7z
2008 Jul 21
3
[LLVMdev] Casting between address spaces and address space semantics
...d that we have a static
> default implementation store in the class. It is unclear to me if
> this is the right class for it as not as it describes the structure
> and alignment while address spaces seems distinct from that. I feel
> that this information should be part of the TargetMachine as the
> address spaces description is part of a target machine but I may be
> wrong here so if someone has a different opinion here, please chime in.
From the looks of it, TargetMachine was only used in the codegenerator, and
the other transformation passes can't access it. Or is tha...
2017 Oct 03
2
TargetMachine vs LLVMTargetMachine
The distinction between the LLVMTargetMachine and TargetMachine classes has become somewhat muddy recently. So I created:
https://reviews.llvm.org/D38482
to clean things up. During review it was noted that we may rather merge the two instead which looks like this:
https://reviews.llvm.org/D38489 <https://reviews.llvm.org/D38489>
We r...