Commit Graph

169 Commits

Author SHA1 Message Date
Evan Cheng
4b64e8a9e1 Separate MCInstPrinter registration from AsmPrinter registration.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135974 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-25 21:20:24 +00:00
Evan Cheng
1b0fc9b418 Fix last bits of MC layer issues. llvm-mc doesn't need to initialize TargetMachine's anymore.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135963 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-25 20:53:02 +00:00
Evan Cheng
e78085a3c0 Combine all MC initialization routines into one. e.g. InitializeX86MCAsmInfo,
InitializeX86MCInstrInfo, etc. are combined into InitializeX86TargetMC.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135812 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-22 21:58:54 +00:00
Benjamin Kramer
a503ede94b llvm-objdump: Don't ignore errors from raw_fd_ostream.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135787 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-22 18:35:11 +00:00
Chandler Carruth
4039313b4c Move the registered target printing in version strings completely out of
the Support library. Now its part of the TargetRegistry, and the three
commands that care about this explicitly register this extra bit of
version information.

The set of commands which care was computed by intersecting those which
use the Support library's version string printing and those that
initialize all the registered targets in a way that produces
a meaningful list. The only odd ball out is that 'clang -cc1as -version'
no longer prints the registered targets. I don't think anyone is really
interested in that (especially as the fact that llvm-mc does so is under
a FIXME), but if someone really does want this back I'll happily apply
the same patch there.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135757 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-22 07:50:48 +00:00
Benjamin Kramer
685a2501b2 Sketch out an CFG reconstruction mode for llvm-objdump.
- Not great yet, but it's a start.
- Requires an object file with a symbol table. (I really want to fix this, but it'll need a whole new algorithm)
- ELF and COFF won't work at the moment due to libObject shortcomings.

To try it out run
$ llvm-objdump -d --cfg foo.o

This will create a graphviz file for every symbol in the object file's text section containing a CFG.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135608 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-20 19:37:35 +00:00
Benjamin Kramer
14c92467e7 Fix off-by-one.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135533 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-19 22:59:25 +00:00
Evan Cheng
439661395f 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135468 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-19 06:37:02 +00:00
Benjamin Kramer
739b65bf85 Teach llvm-objdump to disassemble sections symbol by symbol.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135289 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-15 18:39:24 +00:00
Evan Cheng
1abf2cb59b Rename createAsmInfo to createMCAsmInfo and move registration code to MCTargetDesc to prepare for next round of changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135219 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-14 23:50:31 +00:00
Eli Friedman
0392a0431e Remove some unnecessary includes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134528 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-06 20:48:27 +00:00
Evan Cheng
b262799d49 createMCInstPrinter doesn't need TargetMachine anymore.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134525 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-06 19:45:42 +00:00
Evan Cheng
276365dd4b 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!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134127 91177308-0d34-0410-b5e6-96231b3b80d8
2011-06-30 01:53:36 +00:00
Michael J. Spencer
25b15777df Object: Add proper error handling.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133872 91177308-0d34-0410-b5e6-96231b3b80d8
2011-06-25 17:55:23 +00:00
Jay Foad
ddcdcc8863 Remove unused STL header includes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130068 91177308-0d34-0410-b5e6-96231b3b80d8
2011-04-23 19:53:52 +00:00
Bill Wendling
a5c177e70a We need to pass the TargetMachine object to the InstPrinter if we are printing
the alias of an InstAlias instead of the thing being aliased. Because we need to
know the features that are valid for an InstAlias.

This is part of a work-in-progress.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127986 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-21 04:13:46 +00:00
Michael J. Spencer
59315d1d54 llvm-objdump: Remove redundant includes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123902 91177308-0d34-0410-b5e6-96231b3b80d8
2011-01-20 07:22:13 +00:00
Michael J. Spencer
d11699d3c0 llvm-nm: Fix warning.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123901 91177308-0d34-0410-b5e6-96231b3b80d8
2011-01-20 07:22:04 +00:00
Michael J. Spencer
92e1deb051 Add llvm-objdump
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123898 91177308-0d34-0410-b5e6-96231b3b80d8
2011-01-20 06:39:06 +00:00