Commit Graph

14 Commits

Author SHA1 Message Date
Owen Anderson add6f1d2e9 Make it feasible for clients using EngineBuilder to capture the TargetMachine that is created as part of selecting the appropriate target.
This is necessary if the client wants to be able to mutate TargetOptions (for example, fast FP math mode) after the initial creation of the ExecutionEngine.

llvm-svn: 153342
2012-03-23 17:40:56 +00:00
Dylan Noblesmith 7f26246a71 ExecutionEngine: refactor interface
The OptLevel is now redundant with the TargetMachine*.
And selectTarget() isn't really JIT-specific and could probably
get refactored into one of the lower level libraries.

llvm-svn: 146355
2011-12-12 04:20:36 +00:00
Peter Collingbourne dff247868a EngineBuilder: support for custom TargetOptions. Fixes the
ExceptionDemo example.

llvm-svn: 146108
2011-12-07 23:58:57 +00:00
Nick Lewycky 50f02cb21b Move global variables in TargetMachine into new TargetOptions class. As an API
change, now you need a TargetOptions object to create a TargetMachine. Clang
patch to follow.

One small functionality change in PTX. PTX had commented out the machine
verifier parts in their copy of printAndVerify. That now calls the version in
LLVMTargetMachine. Users of PTX who need verification disabled should rely on
not passing the command-line flag to enable it.

llvm-svn: 145714
2011-12-02 22:16:29 +00:00
Dylan Noblesmith 19a58df9bb ExecutionEngine: honor optimization level
It was getting ignored after r144788.

Also fix an accidental implicit cast from the OptLevel enum
to an optional bool argument. MSVC warned on this, but gcc
didn't.

llvm-svn: 145633
2011-12-01 21:49:21 +00:00
Sebastian Pop 94441fbad7 rename getHostTriple into getDefaultTargetTriple
llvm-svn: 143502
2011-11-01 21:32:20 +00:00
Evan Cheng 2bb4035707 Move TargetRegistry and TargetSelect from Target to Support where they belong.
These are strictly utilities for registering targets and components.

llvm-svn: 138450
2011-08-24 18:08:43 +00:00
Evan Cheng efd9b4240f - Move CodeModel from a TargetMachine global option to MCCodeGenInfo.
- Introduce JITDefault code model. This tells targets to set different default
  code model for JIT. This eliminates the ugly hack in TargetMachine where
  code model is changed after construction.

llvm-svn: 135580
2011-07-20 07:51:56 +00:00
Evan Cheng 2129f59637 Introduce MCCodeGenInfo, which keeps information that can affect codegen
(including compilation, assembly). Move relocation model Reloc::Model from
TargetMachine to MCCodeGenInfo so it's accessible even without TargetMachine.

llvm-svn: 135468
2011-07-19 06:37:02 +00:00
Evan Cheng fe6e405e8c Fix the ridiculous SubtargetFeatures API where it implicitly expects CPU name to
be the first encoded as the first feature. It then uses the CPU name to look up
features / scheduling itineray even though clients know full well the CPU name
being used to query these properties.

The fix is to just have the clients explictly pass the CPU name!

llvm-svn: 134127
2011-06-30 01:53:36 +00:00
Evan Cheng 8264e272a9 Sink SubtargetFeature and TargetInstrItineraries (renamed MCInstrItineraries) into MC.
llvm-svn: 134049
2011-06-29 01:14:12 +00:00
Dylan Noblesmith 1756faa472 ExecutionEngine: fix JIT/MCJIT selectTarget() duplication (v2)
This prepares for making JITCtor/MCJITCtor take a
TargetMachine* directly from clients like EngineBuilder.

llvm-svn: 131316
2011-05-13 21:36:16 +00:00
Jakob Stoklund Olesen 58799a35e5 Revert ExecutionEngine patches, they either failed to build or broke unit tests.
Please ensure the build is clean and tests are passing when recommitting.

llvm-svn: 131044
2011-05-07 03:12:54 +00:00
Dylan Noblesmith 00dd3d6001 ExecutionEngine: add missing file
From revision 131025.

llvm-svn: 131029
2011-05-06 22:20:09 +00:00