Commit Graph

102814 Commits

Author SHA1 Message Date
Joerg Sonnenberger fcc3ec90a5 Introduce FindTargetProgramPath to check for a target-specific helper
program and fallback to plain version otherwise. Use this for the NetBSD
target to make it try e.g. i486--netbsdelf-as and -ld for target
i486--netbsdelf.

llvm-svn: 127996
2011-03-21 14:01:40 +00:00
Joerg Sonnenberger bc923f3f7d Memorize presence/absence of -nostdlib in Driver.
Drop program paths on NetBSD (unused). Only include lib dir, if
-nostdlib is absent. Use = to allow --sysroot to work.

llvm-svn: 127995
2011-03-21 13:59:26 +00:00
Joerg Sonnenberger 6165ab1132 Remember sysroot in Driver. Pass it down to ld for NetBSD, FreeBSD
and DragonFly. Use the --sysroot= form for Linux. Fix handling of =
prefix for -B.

llvm-svn: 127994
2011-03-21 13:51:29 +00:00
Bill Wendling 7e570b5ed8 A WIP commit of the InstAlias printing cleanup. This code will soon replace the
code below it. Even though it looks very similar, it will match more precisely
and geneate better functions in the long run.

llvm-svn: 127991
2011-03-21 08:59:17 +00:00
Bill Wendling 5d3174c102 Add the IAPrinter class.
This is a helper class that will make it easier to say which InstAliases can be
printed and which cannot (because of ambiguity).

llvm-svn: 127990
2011-03-21 08:40:31 +00:00
Bill Wendling 7e5771d7ce * Add classes that support the "feature" information.
* Move the code that emits the reg in reg class matching into its own function.

llvm-svn: 127988
2011-03-21 08:31:53 +00:00
Bill Wendling a8da50d011 Pass in the TargetMachine parameter to the inst printer.
llvm-svn: 127987
2011-03-21 05:02:03 +00:00
Bill Wendling 00f0cddfd4 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.

llvm-svn: 127986
2011-03-21 04:13:46 +00:00
Anders Carlsson 701822a48e As suggested by Nick Lewycky, ignore debugging intrinsics when trying to decide whether a destructor is empty or not.
llvm-svn: 127985
2011-03-21 02:42:27 +00:00
Nick Lewycky d078183725 Fix comments
llvm-svn: 127984
2011-03-21 02:26:01 +00:00
Peter Collingbourne e4c02400ad Code modification hints have been known as fix-it hints for almost
a year now.  Update the internals manual.

llvm-svn: 127983
2011-03-21 01:45:18 +00:00
Eli Friedman 8e15a661bf This README entry was fixed recently.
llvm-svn: 127982
2011-03-21 01:33:03 +00:00
Evan Cheng 0663f23bd8 Re-apply r127953 with fixes: eliminate empty return block if it has no predecessors; update dominator tree if cfg is modified.
llvm-svn: 127981
2011-03-21 01:19:09 +00:00
David Chisnall e1d2584d44 Fix Objective-C++ exceptions (GNU runtime).
llvm-svn: 127980
2011-03-20 21:35:39 +00:00
Anders Carlsson 6dc204de40 __cxa_atexit does not throw.
llvm-svn: 127977
2011-03-20 20:52:32 +00:00
Anders Carlsson 336fd90f4d Don't try to eliminate invokes to __cxa_atexit.
llvm-svn: 127976
2011-03-20 20:21:33 +00:00
Anders Carlsson fcec2f519a Don't segfault on mutual recursion, as pointed out by Frits.
llvm-svn: 127975
2011-03-20 20:16:43 +00:00
Anders Carlsson 48a44911d3 Address comments from Frits van Bommel.
llvm-svn: 127974
2011-03-20 19:51:13 +00:00
Jakob Stoklund Olesen 35502423de Process all dead defs after rematerializing during splitting.
llvm-svn: 127973
2011-03-20 19:46:23 +00:00
Rafael Espindola 1557fd6d39 Write the section table and the section data in the same order that
gun as does. This makes it a lot easier to compare the output of both
as the addresses are now a lot closer.

llvm-svn: 127972
2011-03-20 18:44:20 +00:00
Argyrios Kyrtzidis e762020bb9 In clang_parseTranslationUnit_Impl,p ut the source file after command_line_args otherwise
if '-x' flag is present it will be unused.

llvm-svn: 127971
2011-03-20 18:17:52 +00:00
Anders Carlsson ee6bc70d2f Add an optimization to GlobalOpt that eliminates calls to __cxa_atexit, if the function passed is empty.
llvm-svn: 127970
2011-03-20 17:59:11 +00:00
Benjamin Kramer dce83c522c Avoid initializing posix_spawn_file_actions_t if not used.
- glibc falls back to fork+exec if a file actions object is present.
- On BSDs this saves a malloc.

llvm-svn: 127969
2011-03-20 15:52:24 +00:00
Peter Collingbourne a85fc0a2f3 Only objects are declared const by a constexpr specifier, per C++0x [dcl.constexpr]p9
llvm-svn: 127967
2011-03-20 08:06:45 +00:00
Argyrios Kyrtzidis 0d0254755b If a class inherits from RefCountedBaseVPTR allow all its subclasses to be used with IntrusiveRefCntPtr.
llvm-svn: 127966
2011-03-20 06:14:56 +00:00
Jakob Stoklund Olesen e55003fb04 Also eliminate redundant spills downstream of inserted reloads.
This can happen when multiple sibling registers are spilled after live range
splitting.

llvm-svn: 127965
2011-03-20 05:44:58 +00:00
Jakob Stoklund Olesen 39488642d3 Change an argument to a LiveInterval instead of a register number to save some redundant lookups.
llvm-svn: 127964
2011-03-20 05:44:55 +00:00
Greg Clayton 7a5388bf75 Split all of the core of LLDB.framework/lldb.so into a
static archive that can be linked against. LLDB.framework/lldb.so
exports a very controlled API. Splitting the API into a static
library allows other tools (debugserver for now) to use the power
of the LLDB debugger core, yet not export it as its API is not
portable or maintainable. The Host layer and many of the other
internal only APIs can now be statically linked against.

Now LLDB.framework/lldb.so links against "liblldb-core.a" instead
of compiling the .o files only for the shared library. This fix
is only for compiling with Xcode as the Makefile based build already
does this.

The Xcode projecdt compiler has been changed to LLVM. Anyone using
Xcode 3 will need to manually change the compiler back to GCC 4.2,
or update to Xcode 4.

llvm-svn: 127963
2011-03-20 04:57:14 +00:00
Daniel Dunbar 76c90c65e2 Disable test in a way that keeps lit happy.
llvm-svn: 127962
2011-03-20 00:04:51 +00:00
Francois Pichet 13b4e68642 Downgrade err_mismatched_exception_spec to a ExtWarning in Microsoft mode. MSVC doesn't do any validation on exception specifications.
This remove 1 error when parsing MSVC stl lib with clang.

llvm-svn: 127961
2011-03-19 23:05:18 +00:00
Jakob Stoklund Olesen ccacd0df19 Replace a broken LiveInterval::MergeValueInAsValue() with something simpler.
llvm-svn: 127960
2011-03-19 23:02:49 +00:00
Jakob Stoklund Olesen 8698507fe1 Add debug output.
llvm-svn: 127959
2011-03-19 23:02:47 +00:00
Oscar Fuentes cae1b90915 Make llvm-config.in configuration more MSYS-friendly.
Some of those POSIX <-> Windows command line conversions ended on
failure.

llvm-svn: 127958
2011-03-19 22:52:33 +00:00
Oscar Fuentes 916fb1a62b CMake: store TARGET_TRIPLE on llvm-config.in.
llvm-svn: 127957
2011-03-19 22:52:25 +00:00
Oscar Fuentes 877894a2fa Update CMake library dependencies.
llvm-svn: 127956
2011-03-19 22:52:13 +00:00
Daniel Dunbar 327cd36f74 Revert r127953, "SimplifyCFG has stopped duplicating returns into predecessors
to canonicalize IR", it broke a lot of things.

llvm-svn: 127954
2011-03-19 21:47:14 +00:00
Evan Cheng 824a711305 SimplifyCFG has stopped duplicating returns into predecessors to canonicalize IR
to have single return block (at least getting there) for optimizations. This
is general goodness but it would prevent some tailcall optimizations.
One specific case is code like this:
int f1(void);
int f2(void);
int f3(void);
int f4(void);
int f5(void);
int f6(void);
int foo(int x) {
  switch(x) {
  case 1: return f1();
  case 2: return f2();
  case 3: return f3();
  case 4: return f4();
  case 5: return f5();
  case 6: return f6();
  }
}

=>
LBB0_2:                                 ## %sw.bb
  callq   _f1
  popq    %rbp
  ret
LBB0_3:                                 ## %sw.bb1
  callq   _f2
  popq    %rbp
  ret
LBB0_4:                                 ## %sw.bb3
  callq   _f3
  popq    %rbp
  ret

This patch teaches codegenprep to duplicate returns when the return value
is a phi and where the phi operands are produced by tail calls followed by
an unconditional branch:

sw.bb7:                                           ; preds = %entry
  %call8 = tail call i32 @f5() nounwind
  br label %return
sw.bb9:                                           ; preds = %entry
  %call10 = tail call i32 @f6() nounwind
  br label %return
return:
  %retval.0 = phi i32 [ %call10, %sw.bb9 ], [ %call8, %sw.bb7 ], ... [ 0, %entry ]
  ret i32 %retval.0

This allows codegen to generate better code like this:

LBB0_2:                                 ## %sw.bb
        jmp     _f1                     ## TAILCALL
LBB0_3:                                 ## %sw.bb1
        jmp     _f2                     ## TAILCALL
LBB0_4:                                 ## %sw.bb3
        jmp     _f3                     ## TAILCALL

rdar://9147433

llvm-svn: 127953
2011-03-19 17:17:39 +00:00
Evan Cheng b1f3b4989f Minor code re-structuring.
llvm-svn: 127952
2011-03-19 17:03:16 +00:00
Nadav Rotem e7a101ccab Add support for legalizing UINT_TO_FP of vectors on platforms which do
not have native support for this operation (such as X86).
The legalized code uses two vector INT_TO_FP operations and is faster
than scalarizing.

llvm-svn: 127951
2011-03-19 13:09:10 +00:00
Benjamin Kramer f4ac9ffac1 Initialize FakeAddressSpaceMap flag.
llvm-svn: 127950
2011-03-19 13:04:25 +00:00
Anton Yartsev acb43dbf9b makes vec_step operator work when AltiVec support is enabled
llvm-svn: 127949
2011-03-19 07:53:43 +00:00
Eli Friedman ecdb00e60d Update Passes.html, part 3: alphabetize descriptions.
llvm-svn: 127948
2011-03-19 05:02:14 +00:00
Eli Friedman e04761cbcd Update Passes.html, part 2: cleanup a bit more dead docs, a few more
description updates.

llvm-svn: 127947
2011-03-19 04:55:29 +00:00
Eli Friedman e513e87201 Update Passes.html, part 1: remove passes which were removed from the tree,
update short descriptions to match those from the options, alphabetize table
of contents.

llvm-svn: 127946
2011-03-19 04:47:52 +00:00
Stuart Hastings 142f836d0e Disable test to unbreak Linux. Radar 9156771.
llvm-svn: 127945
2011-03-19 03:56:38 +00:00
Stuart Hastings 12d5312622 Reapply 127939 since Daniel fixed the breakage. <rdar://problem/9012638>
llvm-svn: 127944
2011-03-19 02:42:31 +00:00
Stuart Hastings 08b4daa191 Revert 127939. <rdar://problem/9012638>
llvm-svn: 127943
2011-03-19 02:33:56 +00:00
Daniel Dunbar 7594237964 Unbreak build.
llvm-svn: 127942
2011-03-19 02:06:21 +00:00
Devang Patel 9cd6796104 Test case for r127940.
llvm-svn: 127941
2011-03-19 01:40:43 +00:00
Stuart Hastings 83d4a28d1f Revise r126127 to address Daniel's comments. <rdar://problem/9012638>
llvm-svn: 127939
2011-03-19 01:32:01 +00:00