Commit Graph

104440 Commits

Author SHA1 Message Date
Daniel Dunbar a37aab2515 Target/PPC: Add a TargetTriple field.
llvm-svn: 129809
2011-04-19 20:54:28 +00:00
Chris Lattner 46f1614d56 use the newly introduced IRBuilder getInt() method to reduce some
redundancy pointed out by John.

llvm-svn: 129808
2011-04-19 20:53:45 +00:00
Anton Korobeynikov 4322a7d2c6 More fixes for missed includes
llvm-svn: 129807
2011-04-19 20:50:32 +00:00
Chris Lattner f5f4439265 add a helper method.
llvm-svn: 129806
2011-04-19 20:47:57 +00:00
Daniel Dunbar ed3d5496dc llc: Eliminate a use of getDarwinMajorNumber().
- As before, there is a minor semantic change here (evidenced by the test
   change) for Darwin triples that have no version component. I debated changing
   the default behavior of isOSVersionLT, but decided it made more sense for
   triples to be explicit.

llvm-svn: 129805
2011-04-19 20:46:13 +00:00
Anton Korobeynikov 147ecfad82 Add missed include
llvm-svn: 129804
2011-04-19 20:45:29 +00:00
Daniel Dunbar 9483bb6bf3 Target: Eliminate a use of getDarwinMajorNumber().
llvm-svn: 129803
2011-04-19 20:44:08 +00:00
Daniel Dunbar 4a7783b0c2 CodeGen: Eliminate a use of getDarwinMajorNumber().
- There is a minor semantic change here (evidenced by the test change) for
   Darwin triples that have no version component. I debated changing the default
   behavior of isOSVersionLT, but decided it made more sense for triples to be
   explicit.

llvm-svn: 129802
2011-04-19 20:32:39 +00:00
Daniel Dunbar 0b654f4299 ADT/Triple: Add helper function for OS X version checks.
llvm-svn: 129801
2011-04-19 20:30:10 +00:00
Daniel Dunbar 78f5241504 ADT/Triple: Add isOSVersionLT helper function.
llvm-svn: 129800
2011-04-19 20:30:07 +00:00
Daniel Dunbar 99f904c72d ADT/Triple: Generalize and simplify getDarwinNumber to just be getOSVersion.
llvm-svn: 129799
2011-04-19 20:24:34 +00:00
Daniel Dunbar d74bac70c4 ADT/Triple: Add support for more explicit "osx" and "ios" OS names.
llvm-svn: 129798
2011-04-19 20:19:27 +00:00
Johnny Chen c1c92a2ab3 Converted to use SBProcess.LaunchSimple().
And use self.TraceOn() API.

llvm-svn: 129797
2011-04-19 20:11:58 +00:00
Stuart Hastings 468086d5e1 Delete unnecessary variable. <rdar://problem/7662569>
llvm-svn: 129796
2011-04-19 20:09:38 +00:00
Johnny Chen bd9b6e9ffb Converted to use SBProcess.LaunchSimple().
llvm-svn: 129795
2011-04-19 19:54:06 +00:00
Argyrios Kyrtzidis 1618023018 We regard a function as 'unused' from the codegen perspective, so our warnings diverge from
gcc's unused warnings which don't get emitted if the function is referenced even in an unevaluated context
(e.g. in templates, sizeof, etc.). Also, saying that a function is 'unused' because it won't get codegen'ed
is somewhat misleading.

- Don't emit 'unused' warnings for functions that are referenced in any part of the user's code.
- A warning that an internal function/variable won't get emitted is useful though, so introduce
  -Wunneeded-internal-declaration which will warn if a function/variable with internal linkage is not
  "needed" ('used' from the codegen perspective), e.g:

  static void foo() { }

  template <int>
  void bar() {
    foo();
  }

test.cpp:1:13: warning: function 'foo' is not needed and will not be emitted
static void foo() { }
            ^

Addresses rdar://8733476.

llvm-svn: 129794
2011-04-19 19:51:10 +00:00
Johnny Chen aedbe0f347 Converted to use SBProcess.LaunchSimple().
llvm-svn: 129793
2011-04-19 19:50:43 +00:00
Johnny Chen 90da3ccadb Use self.TraceOn() API.
llvm-svn: 129792
2011-04-19 19:49:09 +00:00
Johnny Chen 9efcb0ec4d Converted to use SBProcess.LaunchSimple() API.
And use self.TraceOn() in order to print more debug output.

llvm-svn: 129791
2011-04-19 19:44:26 +00:00
Johnny Chen fbf1cfea12 Converted to use SBProcess.LaunchSimple().
And use self.TraceOn() API.

llvm-svn: 129790
2011-04-19 19:34:41 +00:00
Johnny Chen 272ae4df7c Converted to use SBProcess.LaunchSimple().
llvm-svn: 129789
2011-04-19 19:25:37 +00:00
Johnny Chen baf11799da Only print more debug out when self.TraceOn() returns True.
llvm-svn: 129788
2011-04-19 19:21:19 +00:00
Johnny Chen d04cd7b0c4 Converted to use SBProcess.LaunchSimple().
llvm-svn: 129787
2011-04-19 19:14:12 +00:00
Johnny Chen ff4a08372e Modify docstring.
llvm-svn: 129786
2011-04-19 19:12:24 +00:00
Johnny Chen f1251cc820 Add a TraceOn(self) method to the base test class, which returns True if we are
currently in trace mode (-t to dotest.py), i.e., tracing the lldb command execution.
Change TestInferiorCrashing.inferior_crashing_python(self) to check this flag in
order to print the stack trace of the inferior thread.

llvm-svn: 129785
2011-04-19 19:04:38 +00:00
Johnny Chen 4a2283a954 Converted to use SBProcess.LaunchSimple().
llvm-svn: 129784
2011-04-19 18:52:56 +00:00
Peter Collingbourne 133587f08b Add a new expression classification, CL_AddressableVoid
CL_AddressableVoid is the expression classification used for void
expressions whose address can be taken, i.e. the result of [], *
or void variable references in C, as opposed to things like the
result of a void function call.

llvm-svn: 129783
2011-04-19 18:51:51 +00:00
Johnny Chen 9ef4563c2a Converted to use SBProcess.LaunchSimple().
llvm-svn: 129782
2011-04-19 18:50:04 +00:00
Eric Christopher c721b0db6d Remove some duplicate op action entries and reorganize.
llvm-svn: 129781
2011-04-19 18:49:19 +00:00
Johnny Chen 0fbb74406c Converted to use SBProcess.LaunchSimple().
llvm-svn: 129780
2011-04-19 18:38:30 +00:00
Johnny Chen 822198ef77 Converted to use SBProcess.LaunchSimple().
llvm-svn: 129779
2011-04-19 18:23:28 +00:00
Johnny Chen c506d8bf9f Converted to use SBProcess.LaunchSimple().
llvm-svn: 129778
2011-04-19 18:17:20 +00:00
Anton Korobeynikov 0529d4da93 Add missed files from my last commit.
llvm-svn: 129777
2011-04-19 18:14:19 +00:00
Johnny Chen d1d11c8c9f Convert some tests to use the SBProcess.LaunchSimple API requiring only args, envs, and cwd
from SBProcess.Launch which takes many more arguments that are useless for the test scenario.

llvm-svn: 129776
2011-04-19 18:12:47 +00:00
Bob Wilson 0858c3aaed This patch combines several changes from Evan Cheng for rdar://8659675.
Making use of VFP / NEON floating point multiply-accumulate / subtraction is
difficult on current ARM implementations for a few reasons.
1. Even though a single vmla has latency that is one cycle shorter than a pair
   of vmul + vadd, a RAW hazard during the first (4? on Cortex-a8) can cause
   additional pipeline stall. So it's frequently better to single codegen
   vmul + vadd.
2. A vmla folowed by a vmul, vmadd, or vsub causes the second fp instruction to
   stall for 4 cycles. We need to schedule them apart.
3. A vmla followed vmla is a special case. Obvious issuing back to back RAW
   vmla + vmla is very bad. But this isn't ideal either:
     vmul
     vadd
     vmla
   Instead, we want to expand the second vmla:
     vmla
     vmul
     vadd
   Even with the 4 cycle vmul stall, the second sequence is still 2 cycles
   faster.

Up to now, isel simply avoid codegen'ing fp vmla / vmls. This works well enough
but it isn't the optimial solution. This patch attempts to make it possible to
use vmla / vmls in cases where it is profitable.

A. Add missing isel predicates which cause vmla to be codegen'ed.
B. Make sure the fmul in (fadd (fmul)) has a single use. We don't want to
   compute a fmul and a fmla.
C. Add additional isel checks for vmla, avoid cases where vmla is feeding into
   fp instructions (except for the #3 exceptional case).
D. Add ARM hazard recognizer to model the vmla / vmls hazards.
E. Add a special pre-regalloc case to expand vmla / vmls when it's likely the
   vmla / vmls will trigger one of the special hazards.

Enable these fp vmlx codegen changes for Cortex-A9.

llvm-svn: 129775
2011-04-19 18:11:57 +00:00
Bob Wilson d04a83f8f2 Add -mcpu=cortex-a9-mp. It's cortex-a9 with MP extension. rdar://8648637.
llvm-svn: 129774
2011-04-19 18:11:52 +00:00
Bob Wilson a2881ee8a4 Avoid some 's' 16-bit instruction which partially update CPSR
(and add false dependency) when it isn't dependent on last CPSR defining
instruction. rdar://8928208

llvm-svn: 129773
2011-04-19 18:11:49 +00:00
Bob Wilson df612ba006 Avoid write-after-write issue hazards for Cortex-A9.
Add a avoidWriteAfterWrite() target hook to identify register classes that
suffer from write-after-write hazards. For those register classes, try to avoid
writing the same register in two consecutive instructions.

This is currently disabled by default.  We should not spill to avoid hazards!
The command line flag -avoid-waw-hazard can be used to enable waw avoidance.

llvm-svn: 129772
2011-04-19 18:11:45 +00:00
Bob Wilson 3e5944d96b Some single-precision VFP instructions can execute in either the VPF or Neon
pipelines, at least on Cortex-A9.

llvm-svn: 129771
2011-04-19 18:11:38 +00:00
Bob Wilson f33715e554 Improvements for the Cortex-A9 scheduling itineraries.
llvm-svn: 129770
2011-04-19 18:11:36 +00:00
Anton Korobeynikov e63da933eb Move abi bits to separate header. Force AAPCS for EABI in accordance with ARM RTABI.
llvm-svn: 129769
2011-04-19 17:52:09 +00:00
Anton Korobeynikov 75e3c1993c Add ARM EABI function aliases to routines
llvm-svn: 129768
2011-04-19 17:51:24 +00:00
Anton Korobeynikov bdadd87c4d Make use of LOCAL_LABEL macro
llvm-svn: 129767
2011-04-19 17:50:42 +00:00
Anton Korobeynikov 1653610449 Get rid of darwin'isms. Provide convenient macro for assembler local lables.
llvm-svn: 129766
2011-04-19 17:50:09 +00:00
Eli Friedman ee92a6b332 Add support for FastISel'ing varargs calls.
llvm-svn: 129765
2011-04-19 17:22:22 +00:00
Jakob Stoklund Olesen af12138d10 Force the greedy register allocator to be linked alongside linear scan.
This means that the new register allocator can be used with 'clang -mllvm -regalloc=greedy'.

llvm-svn: 129764
2011-04-19 17:17:58 +00:00
Eli Friedman bcd09b3a7f SelectBasicBlock is rather slow even when it doesn't do anything; skip the
unnecessary work where possible.

llvm-svn: 129763
2011-04-19 17:01:08 +00:00
Stuart Hastings 0b68c1219f Support nested CALLSEQ_BEGIN/END; necessary for ARM byval support. <rdar://problem/7662569>
llvm-svn: 129761
2011-04-19 16:16:58 +00:00
Jay Foad 6a85be25a4 Trivial simplification.
llvm-svn: 129759
2011-04-19 15:23:29 +00:00
Daniel Dunbar ddd3a2ec1d clang_darwin: Tweak runtime library definitions to include divmod functions.
llvm-svn: 129757
2011-04-19 15:14:46 +00:00