1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 03:23:01 +02:00
Commit Graph

3111 Commits

Author SHA1 Message Date
John McCall
3eb1263b83 Transcribe IRC to svn. Also don't print basic block names twice if they match.
llvm-svn: 109787
2010-07-29 18:20:13 +00:00
John McCall
1e34d6da8e Make the header self-contained and follow #include guidelines.
llvm-svn: 109774
2010-07-29 18:08:23 +00:00
John McCall
892a09a0a9 Switch to using the LLVM CommandLine library so that our help
message is properly contaminated with nonsense about timing passes
that doesn't apply at all to this utility. :)

llvm-svn: 109769
2010-07-29 17:55:00 +00:00
Benjamin Kramer
d1340209a1 Plug the remaining MC leaks by giving MCObjectStreamer/MCAsmStreamer ownership of the TargetAsmBackend and the MCCodeEmitter.
llvm-svn: 109767
2010-07-29 17:48:06 +00:00
Rafael Espindola
6401c853ee Make the test while reducing blocks functional. This avoids accessing freed
memory when one of the original BB is destroyed.

llvm-svn: 109747
2010-07-29 14:20:59 +00:00
John McCall
0722760971 Centralize the logic to permanently unify two instructions and make sure
it establishes a context and does a complaining diff.  Also make sure we
unify the prelude and postlude of a diff after a block-diff call.

llvm-svn: 109744
2010-07-29 09:20:34 +00:00
John McCall
8fda7303db Diagnose non-structural differences in the case where blocks were
structurally identical.

llvm-svn: 109743
2010-07-29 09:04:45 +00:00
John McCall
9c21031e5b When unifying instructions during a block diff, actually complain about
any differences we see.  This should only happen if there are "non-structural"
differences between the instructions, i.e. differences which wouldn't cause
diff to return true.

llvm-svn: 109742
2010-07-29 08:59:27 +00:00
John McCall
a56b8f4800 Somehow I was getting reasonable results for the test cases I was interested
in despite not ever incrementing any path costs, so that the only nonzero costs
arose from the all-left path in the first column.  Anyway.  Perform the diff
starting from the beginning of the block to avoid capturing (say) loads of
allocas.

Vastly improves diff results on code that hasn't been mem2reg'ed.

llvm-svn: 109741
2010-07-29 08:53:59 +00:00
John McCall
f1e24e1d2b Cache the result of errs() and implement formatted logging.
llvm-svn: 109740
2010-07-29 08:14:41 +00:00
John McCall
edc50f3f5b Add the llvm-diff tool, which performs a relatively naive structural
diff of a function.  There's a lot of cruft in the current version, and
it's pretty far from perfect, but it's usable.

Currently only capable of comparing functions.  Currently ignores metadata.
Currently ignores most attributes of functions and instructions.

Patches welcome.

llvm-svn: 109739
2010-07-29 07:53:27 +00:00
Jakob Stoklund Olesen
6a7ab2405c Use the right gcc tool args for IsARMArchitecture.
llvm-svn: 109714
2010-07-29 00:52:16 +00:00
Gabor Greif
0899f01287 simplify by using CallSite constructors; virtually eliminates CallSite::get from the tree
llvm-svn: 109687
2010-07-28 22:50:26 +00:00
Rafael Espindola
a618c1e4ec Instead of abusing swapProgramIn, just add a Module argument to
EmitProgressBitcode.

llvm-svn: 109602
2010-07-28 18:12:30 +00:00
Rafael Espindola
3a92982732 Clone and restore the module being reduced in
ReduceMiscompilingFunctions::TestFuncs. This makes the test functional
(i.e., no side effects).

Before we would end up using dead functions if a pass decided to remove them
(inline for example) and we would also keep broken functions and conclude that
that a single function was enough to reproduce the bug.

llvm-svn: 109387
2010-07-26 00:07:51 +00:00
Rafael Espindola
0b77450ebf Revert unintended white space change.
llvm-svn: 109364
2010-07-24 23:05:45 +00:00
Rafael Espindola
f380957779 Fix a trivial use after free.
llvm-svn: 109363
2010-07-24 23:02:11 +00:00
Mikhail Glushenkov
bbeb485c74 Get rid of exceptions in llvmc.
llvmc can be now compiled with llvm-gcc on Windows.

llvm-svn: 109215
2010-07-23 03:42:55 +00:00
Chris Lattner
d9ec30e2fe there is now no reason to link in TARGETS_TO_BUILD since we list
arm explicitly.  X86 and ARM are the only two targets that support
disassembly, so our explicit list is enough.  These other targets
weren't getting pulled in anyway though, since there were no 
references to their symbols.

llvm-svn: 108934
2010-07-20 21:26:27 +00:00
Chris Lattner
4aff2379b6 fix edis to only try to link in the x86 parts if the x86 backend is
enabled.  Add direct ARM support.

llvm-svn: 108933
2010-07-20 21:23:57 +00:00
Douglas Gregor
2da8b36e05 Fix edis makefile
llvm-svn: 108931
2010-07-20 21:21:27 +00:00
Chris Lattner
c37155ffb7 fix DISABLE_EDIS
llvm-svn: 108925
2010-07-20 20:55:57 +00:00
Chris Lattner
99ad016267 this logic is handled by tools/makefile.
llvm-svn: 108919
2010-07-20 20:33:59 +00:00
Chris Lattner
f70bf1be04 edis needs to link in mcdisassembler.
llvm-svn: 108876
2010-07-20 18:35:23 +00:00
Chris Lattner
543f941787 update cmake.
llvm-svn: 108875
2010-07-20 18:33:29 +00:00
Chris Lattner
2e49f3fb0e edinfo doesn't need to be built here.
llvm-svn: 108873
2010-07-20 18:31:54 +00:00
Chris Lattner
1ac58ea0f3 start straightening out libedis's dependencies and make it fit
better in the llvm world.  Among other things, this changes:

1. The guts of libedis are now moved into lib/MC/MCDisassembler
2. llvm-mc now depends on lib/MC/MCDisassembler, not tools/edis,
   so edis and mc don't have to be built in series.
3. lib/MC/MCDisassembler no longer depends on the C api, the C
   API depends on it.
4. Various code cleanup changes. 

There is still a lot to be done to make edis fit with the llvm
design, but this is an incremental step in the right direction.

llvm-svn: 108869
2010-07-20 18:25:19 +00:00
Owen Anderson
5f218b8612 Speculatively revert r108813, in an attempt to get the self-host buildbots working again. I don't see why this patch
would cause them to fail the way they are, but none of the other intervening patches seem likely either.

llvm-svn: 108818
2010-07-20 08:26:15 +00:00
Owen Anderson
cf625d0179 Reapply r108794, a fix for the failing test from last time.
llvm-svn: 108813
2010-07-20 06:52:42 +00:00
Daniel Dunbar
3280e3aebf Revert r108794, "Separate PassInfo into two classes: a constructor-free
superclass (StaticPassInfo) and a constructor-ful subclass (PassInfo).", it is
breaking teh everything.

llvm-svn: 108805
2010-07-20 03:06:07 +00:00
Owen Anderson
3502f9a91b Separate PassInfo into two classes: a constructor-free superclass (StaticPassInfo) and a constructor-ful subclass (PassInfo).
llvm-svn: 108794
2010-07-20 01:19:58 +00:00
Mikhail Glushenkov
9b60f2b865 llvmc: Add a new option type (switch_list).
llvm-svn: 108673
2010-07-19 03:16:25 +00:00
Daniel Dunbar
150021561c Target: Give the TargetAsmParser access to the TargetMachine.
- Unfortunate, but necessary for now to handle subtarget instruction matching. Eventually we should factor out the lower level target machine information so we don't need to do this.

llvm-svn: 108664
2010-07-19 00:33:49 +00:00
Daniel Dunbar
2747a00d4f edis: Save the TargetMachine in the EDDisassembler object.
llvm-svn: 108663
2010-07-19 00:33:43 +00:00
Daniel Dunbar
4dc7255379 MC: Move several clients to using AsmParser constructor function.
llvm-svn: 108645
2010-07-18 18:31:33 +00:00
Daniel Dunbar
5accac5484 llvm-mc: Fix llvm-mc -as-lex.
llvm-svn: 108644
2010-07-18 18:31:28 +00:00
Duncan Sands
0f6415ef75 Fix what seems like a clear buffer overflow, noticed by cppcheck.
llvm-svn: 108629
2010-07-17 20:23:37 +00:00
Dan Gohman
f4d2b52ffe Make llvm-bcanalyzer print out the full enum name for all metadata
code ids, not just some of them.

llvm-svn: 108543
2010-07-16 18:28:07 +00:00
Daniel Dunbar
b55ca8e447 build/Darwin: Add an LLVM_LTO_VERSION_OFFSET make variable to allow offsetting
the libLTO library version from the actual build version.

llvm-svn: 108495
2010-07-16 01:41:38 +00:00
Bob Wilson
1f4fed20a5 Remove some broken code to check the DISABLE_EDIS flag (edis is now in the
DIRS list, so it does no good to filter it from PARALLEL_DIRS), and replace
it with a check to disable building the shared library version of edis when
the flag is set.  Disabling it entirely does not work because MC uses it now.

llvm-svn: 108367
2010-07-14 22:41:51 +00:00
Duncan Sands
f7b98e2b1e Convert some tab stops into spaces.
llvm-svn: 108130
2010-07-12 08:16:59 +00:00
Bill Wendling
90b6422f2f Implement the "linker_private_weak" linkage type. This will be used for
Objective-C metadata types which should be marked as "weak", but which the
linker will remove upon final linkage. However, this linkage isn't specific to
Objective-C.

For example, the "objc_msgSend_fixup_alloc" symbol is defined like this:

      .globl l_objc_msgSend_fixup_alloc
      .weak_definition l_objc_msgSend_fixup_alloc
      .section __DATA, __objc_msgrefs, coalesced
      .align 3
l_objc_msgSend_fixup_alloc:
       .quad   _objc_msgSend_fixup
       .quad   L_OBJC_METH_VAR_NAME_1

This is different from the "linker_private" linkage type, because it can't have
the metadata defined with ".weak_definition".

Currently only supported on Darwin platforms.

llvm-svn: 107433
2010-07-01 21:55:59 +00:00
Daniel Dunbar
37b4089fbf MC: Pass the target instance to the AsmParser constructor.
llvm-svn: 107426
2010-07-01 20:41:56 +00:00
Devang Patel
8a819baed9 Preserve debug info for only extracted symbols.
llvm-svn: 107417
2010-07-01 19:58:05 +00:00
Mikhail Glushenkov
c972650d62 Make -filelist work with -linker=c++.
llvm-svn: 107362
2010-07-01 01:00:32 +00:00
Bill Wendling
59ef9bcc6d Revert r107205 and r107207.
llvm-svn: 107215
2010-06-29 22:34:52 +00:00
Bill Wendling
05a4c0b1f2 Introducing the "linker_weak" linkage type. This will be used for Objective-C
metadata types which should be marked as "weak", but which the linker will
remove upon final linkage. For example, the "objc_msgSend_fixup_alloc" symbol is
defined like this:

       .globl l_objc_msgSend_fixup_alloc
       .weak_definition l_objc_msgSend_fixup_alloc
       .section __DATA, __objc_msgrefs, coalesced
       .align 3
l_objc_msgSend_fixup_alloc:
        .quad   _objc_msgSend_fixup
        .quad   L_OBJC_METH_VAR_NAME_1

This is different from the "linker_private" linkage type, because it can't have
the metadata defined with ".weak_definition".

llvm-svn: 107205
2010-06-29 21:24:00 +00:00
Duncan Sands
d0286618b5 Remove variables that are written by not read.
llvm-svn: 107126
2010-06-29 11:07:47 +00:00
Devang Patel
0c927a80fe Use ValueMap instead of DenseMap.
The ValueMapper used by various cloning utility maps MDNodes also.

llvm-svn: 106706
2010-06-24 00:33:28 +00:00
Rafael Espindola
ea22615ccd Add an extra-library-path option to the plugin. This is used to support
having a library both as bitcode and native code. We want to use the
bitcode first, but if codegen produces new undefined references we have to use
the native code to satisfy those references.

Gold has no notion of bitcode and native search directories, so instead it has
an API where the plugin can instruct it to look for the libraries it is passing
to it. This patch uses that API.

llvm-svn: 106674
2010-06-23 20:20:59 +00:00