Commit Graph

104434 Commits

Author SHA1 Message Date
Eric Christopher 7b015c7598 Add an ObjectFile implementation for mach-o.
Patch by Patrick Walton!

llvm-svn: 129974
2011-04-22 03:19:48 +00:00
Eric Christopher 5c896f71ec 80-col fix.
llvm-svn: 129973
2011-04-22 03:07:06 +00:00
NAKAMURA Takumi 6e43e6fad0 include/llvm/Target/TargetAsmInfo.h: Fix a warning.
llvm-svn: 129972
2011-04-22 01:56:59 +00:00
Evan Cheng c0d2004e3c In Thumb2 mode, lower frame indix references to:
add <rd>, sp, #<imm8>
ldr <rd>, [sp, #<imm8>]
When the offset from sp is multiple of 4 and in range of 0-1020.
This saves code size by utilizing 16-bit instructions.

rdar://9321541

llvm-svn: 129971
2011-04-22 01:42:52 +00:00
Evan Cheng 8ea3af47bd Typo
llvm-svn: 129970
2011-04-22 01:40:20 +00:00
Chandler Carruth bab81b9797 Delete the other unused variable in this function. Sorry I missed this
the first time through.

llvm-svn: 129969
2011-04-22 01:29:18 +00:00
Chandler Carruth ea41470726 Remove an unused variable from a function. This is a likely cut-paste-o.
Silences GCC warning.

I wonder why Clang doesn't warn on this...

llvm-svn: 129968
2011-04-22 01:21:06 +00:00
Argyrios Kyrtzidis 98feafed27 Fix crashing rdar://9122854 & http://llvm.org/PR9461.
llvm-svn: 129967
2011-04-22 01:18:40 +00:00
Bill Wendling c14d7322ee Branch folding is folding a landing pad into a regular BB.
An exception is thrown via a call to _cxa_throw, which we don't expect to
return. Therefore, the "true" part of the invoke goes to a BB that has
'unreachable' as its only instruction. This is lowered into an empty MachineBB.
The landing pad for this invoke, however, is directly after the "true" MBB.
When the empty MBB is removed, the landing pad is directly below the BB with the
invoke call. The unconditional branch is removed and then the two blocks are
merged together.

The testcase is too big for a regression test.
<rdar://problem/9305728>

llvm-svn: 129965
2011-04-22 01:07:09 +00:00
Bob Wilson 23c28ee17e Define Neon load/store intrinsics for Clang as macros instead of functions.
This is needed so the front-end can see "aligned" attributes on the type
for the pointer arguments.  Radar 9311427.

llvm-svn: 129964
2011-04-22 00:37:01 +00:00
Johnny Chen d545d9cbbc Make the test case more robust by installing a teardown hook to kill the inferior
rather than calling "process kill" explicitly at the end of the test.

The test might not even reach the end because it could have failed prematurely.

llvm-svn: 129963
2011-04-22 00:33:09 +00:00
Johnny Chen 13af1b55cd Conditionalize the self.expect("dis -f", ...) test scenario to check on Intel disassembly
only when the test is currently running against the relevant architecture.

llvm-svn: 129960
2011-04-22 00:13:28 +00:00
Rafael Espindola 5395f44fe8 Compute the size of the FDE encoding instead of hard coding it. Update
X8664_ELFTargetObjectFile::getFDEEncoding to match reality.

llvm-svn: 129959
2011-04-22 00:08:43 +00:00
Nick Lewycky 207bce31e1 Wire up the -ftest-coverage and -fprofile-arcs flags to .gcno file emission (at
compile time) and .gcda emission (at runtime). --coverage enables both.

This does not yet add the profile_rt library to the link step if -fprofile-arcs
is enabled when linking.

llvm-svn: 129956
2011-04-21 23:44:07 +00:00
Rafael Espindola 6aea59268a Remove unused argument.
llvm-svn: 129955
2011-04-21 23:39:26 +00:00
Nick Lewycky ab18d3088a Fix indentation. No functional change.
llvm-svn: 129954
2011-04-21 23:37:32 +00:00
Rafael Espindola ea61f22dd3 Don't pass address spaces to EmitULEB128IntValue.
llvm-svn: 129953
2011-04-21 23:26:40 +00:00
Devang Patel 94ad6ac13c Fix DWARF description of Q registers.
llvm-svn: 129952
2011-04-21 23:22:35 +00:00
Argyrios Kyrtzidis b77d6f0fd1 Don't hide #warnings in a system header, same as gcc. Fixes rdar://8495837.
llvm-svn: 129951
2011-04-21 23:08:23 +00:00
Argyrios Kyrtzidis 8a8b8773b6 Move the check whether a diagnostic must be ignored because it is in a system header
inside DiagnosticIDs::getDiagnosticLevel.

llvm-svn: 129950
2011-04-21 23:08:18 +00:00
Johnny Chen 9ee96e7b40 Add a HideStdout() method to our TestBase class and call it from TestAbbreviations.py
and TestAliases.py.  Pass the keyword argument 'check=False' to:

    self.runCmd("script my.date()", check=False)

since we want to restore sys.stdout no matter what the outcome of the runCmd is.

llvm-svn: 129949
2011-04-21 22:50:23 +00:00
Richard Smith d4257d847e Fix gcc warning. Add parens to this assert, incidentally reassociating it, but the condition is the same either way.
llvm-svn: 129948
2011-04-21 22:48:40 +00:00
Devang Patel 3712c14be9 Fix DWARF description of S registers.
llvm-svn: 129947
2011-04-21 22:48:26 +00:00
Devang Patel 6d1e4e9646 Add DW_OP_bit_piece.
llvm-svn: 129945
2011-04-21 22:26:13 +00:00
Eric Christopher fca8b75b71 Make sure we include __sync_synchronize on arm platforms if we need it.
llvm-svn: 129944
2011-04-21 22:05:05 +00:00
Richard Trieu 2c850c0980 Add a fixit suggest for missing case keywords inside a switch scope. For instance, in the following code, 'case ' will be suggested before the '1:'
switch (x) {
  1: return 0;
  default: return 1;
}

llvm-svn: 129943
2011-04-21 21:44:26 +00:00
Greg Clayton 2048ea5eba Fixed a case where if a function, inlined function, or global with a mangled
name had a DW_AT_name that was the same string as the DW_AT_MIPS_linkage_name,
then it would get added twice to the DWARF index.

llvm-svn: 129942
2011-04-21 21:41:13 +00:00
Nick Lewycky ed7504e65c Alphabetize this one flag, just to pull it out of my patch.
llvm-svn: 129941
2011-04-21 21:32:34 +00:00
Daniel Dunbar bbd482226e Driver/Darwin: Allow OS X deployment targets like 10.4.11, even though they
can't be represented in the environment define.

llvm-svn: 129939
2011-04-21 21:27:33 +00:00
Devang Patel 2266aa84a1 Refactor.
llvm-svn: 129938
2011-04-21 21:07:35 +00:00
Johnny Chen 72c40825dd Hopefully fix the last fallout of 'commands' to 'command' change.
llvm-svn: 129937
2011-04-21 20:55:57 +00:00
Johnny Chen 71aaf75e3d Use self.TraceOn() API.
llvm-svn: 129936
2011-04-21 20:48:32 +00:00
Johnny Chen ea80ba8b97 Use self.TraceOn() API to decide whether to print debug output.
llvm-svn: 129935
2011-04-21 20:27:45 +00:00
Devang Patel be22131c28 Test case for r129922
llvm-svn: 129934
2011-04-21 20:16:43 +00:00
Argyrios Kyrtzidis 446bcf2d4a Use the ArrayFiller to fill out "holes" in the array initializer due to designated initializers,
avoiding to create separate Exprs for each one.

llvm-svn: 129933
2011-04-21 20:03:38 +00:00
Jay Foad 5514afe6b2 PR9214: Convert Metadata API to use ArrayRef.
llvm-svn: 129932
2011-04-21 19:59:31 +00:00
Jay Foad ea324f154b PR9214: Convert Metadata API to use ArrayRef.
llvm-svn: 129929
2011-04-21 19:59:12 +00:00
Matt Beaumont-Gay 70597d4e50 Don't recycle loop variables.
llvm-svn: 129928
2011-04-21 19:46:23 +00:00
Greg Clayton 020b717f6a More iteration on the new option value stuff. We now define an
OptionValueCollection class that can be subclassed to provide access to 
internal settings that are stored as ObjectValue subclasses.

llvm-svn: 129926
2011-04-21 19:21:29 +00:00
Jakob Stoklund Olesen 6a663b8dc8 Allow allocatable ranges from global live range splitting to be split again.
These intervals are allocatable immediately after splitting, but they may be
evicted because of later splitting. This is rare, but when it happens they
should be split again.

The remainder intervals that cannot be allocated after splitting still move
directly to spilling.

SplitEditor::finish can optionally provide a mapping from new live intervals
back to the original interval indexes returned by openIntv().

Each original interval index can map to multiple new intervals after connected
components have been separated. Dead code elimination may also add existing
intervals to the list.

The reverse mapping allows the SplitEditor client to treat the new intervals
differently depending on the split region they came from.

llvm-svn: 129925
2011-04-21 18:38:15 +00:00
Manuel Klimek d861e8b7be Adds a function to run FrontendActions over in-memory code. This is
the first step towards a standalone Clang tool infrastructure.
The plan is to make it easy to build command line tools that run over
the AST of source files in a project outside of the build system.

llvm-svn: 129924
2011-04-21 18:37:41 +00:00
Rafael Espindola c3dc486752 Fix relative relocations. This is sufficient for running the rust testsuite with
MC :-)

llvm-svn: 129923
2011-04-21 18:36:50 +00:00
Devang Patel 46bda61a81 As per ARM docs, register Dx is described as DW_OP_regx(256+x) in DWARF.
llvm-svn: 129922
2011-04-21 17:51:06 +00:00
Devang Patel 28f2719d83 Add comment in output stream.
llvm-svn: 129921
2011-04-21 17:50:24 +00:00
Greg Clayton 9524f25b0f Made the constructors public for all OptionValue classes
so we can instantiate them, and also moved the code that
can get the specific subclass for a OptionValue into the 
OptionValue class.

llvm-svn: 129920
2011-04-21 17:46:10 +00:00
Daniel Dunbar 5a784c8ed1 Driver: Tweak -Xarch diags a bit more, we can't actually differentiate between
unknown and "required more arguments", but only the latter should be feasible in
practice.

llvm-svn: 129919
2011-04-21 17:41:34 +00:00
Daniel Dunbar 6914a98ccd Driver: Improve -Xarch argument diagnostics a bit.
llvm-svn: 129918
2011-04-21 17:32:21 +00:00
Argyrios Kyrtzidis 1f329402ae Fixit suggestion for adding missing tag name should have a space after the tag name. Fixes rdar://9295072
llvm-svn: 129917
2011-04-21 17:29:47 +00:00
Argyrios Kyrtzidis 99fbd4d1d8 Have #pragma message not turn into error by -Werror, by default. Fixes rdar://9308989.
llvm-svn: 129916
2011-04-21 17:11:44 +00:00
Daniel Dunbar 6309828206 Revert r1296656, "Fix rdar://9289512 - not folding load into compare at -O0...",
which broke a couple GCC test suite tests at -O0.

llvm-svn: 129914
2011-04-21 16:14:46 +00:00