1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-21 12:02:58 +02:00
Commit Graph

88057 Commits

Author SHA1 Message Date
Chandler Carruth
c082468143 Provide a default constructor for TimeValue. This was used, but only in
if-ed out code paths and on Windows. Hopefully restores the Windows
build. Thanks to Reid Kleckner for helping triage this.

llvm-svn: 171568
2013-01-05 00:23:09 +00:00
Alex Rosenberg
09515dcbcd Fix warnings from llvm-gcc as seen on darwin10 (10.6).
llvm-svn: 171567
2013-01-05 00:21:12 +00:00
Chandler Carruth
4252d5765c Try to suppress the use of clock_gettime on Darwin which apparantly
defines _POSIX_CPUTIME but doesn't support the clock_* functions.

I don't test the value of _POSIX_CPUTIME because the spec merely says
that if it is defined, the CPU-specific timers are available, whereas it
says that _POSIX_TIMERS must be defined and defined to a value greater
than zero. However, this may not work, as the POSIX spec clearly states:

  "If the symbolic constant _POSIX_CPUTIME is defined, then the symbolic
  constant _POSIX_TIMERS shall also be defined by the implementation to
  have the value 200112L."

If this doesn't work, I'll add more hacks for Darwin.

llvm-svn: 171565
2013-01-05 00:11:21 +00:00
Chandler Carruth
2bffc5cdde Fix an obvious typo spotted by Reid Kleckner, and breaking windows builds.
llvm-svn: 171559
2013-01-04 23:46:04 +00:00
Bill Wendling
c6b2b9e992 Get rid of the 'Bits' mask in the attribute builder.
The bit mask thing will be a thing of the past. It's not extensible enough. Get
rid of its use here. Opt instead for using a vector to hold the attributes.

Note: Some of this code will become obsolete once the rewrite is further along.
llvm-svn: 171553
2013-01-04 23:27:34 +00:00
Chandler Carruth
ae1954050c Add time getters to the process interface for requesting the elapsed
wall time, user time, and system time since a process started.

For walltime, we currently use TimeValue's interface and a global
initializer to compute a close approximation of total process runtime.

For user time, this adds support for an somewhat more precise timing
mechanism -- clock_gettime with the CLOCK_PROCESS_CPUTIME_ID clock
selected.

For system time, we have to do a full getrusage call to extract the
system time from the OS. This is expensive but unavoidable.

In passing, clean up the implementation of the old APIs and fix some
latent bugs in the Windows code. This might have manifested on Windows
ARM systems or other systems with strange 64-bit integer behavior.

The old API for this both user time and system time simultaneously from
a single getrusage call. While this results in fewer system calls, it
also results in a lower precision user time and if only user time is
desired, it introduces a higher overhead. It may be worthwhile to switch
some of the pass timers to not track system time and directly track user
and wall time. The old API also tracked walltime in a confusing way --
it just set it to the current walltime rather than providing any measure
of wall time since the process started the way buth user and system time
are tracked. The new API is more consistent here.

The plan is to eventually implement these methods for a *child* process
by using the wait3(2) system call to populate an rusage struct
representing the whole subprocess execution. That way, after waiting on
a child process its stats will become accurate and cheap to query.

llvm-svn: 171551
2013-01-04 23:19:55 +00:00
Andrew Trick
7bdf2be629 tabs-to-spaces
llvm-svn: 171550
2013-01-04 23:11:35 +00:00
Jakub Staszak
369da81e4b Move 'break' to the right place to prevent fallthru. There is no test-case
because conditions in the next case prevented from doing anything nasty.

llvm-svn: 171549
2013-01-04 23:01:26 +00:00
Jakob Stoklund Olesen
4c9d7d3d77 Special case Recycler::clear(BumpPtrAllocator).
A BumpPtrAllocator has an empty Deallocate() method, but
Recycler::clear() would still call it for every single object ever
allocated, bringing all those objects into cache. As a bonus,
iplist::remove() will also write to the Prev/Next pointers on all the
objects, so all those cache lines have to be written back to RAM before
the pages are given back to the OS.

Stop wasting time and memory bandwith by using the new
clearAndLeakUnsafely() function to jettison all the recycled objects.

llvm-svn: 171541
2013-01-04 22:35:45 +00:00
Jakob Stoklund Olesen
499d789d2b Add an iplist::clearAndLeakNodesUnsafely() function.
The iplist::clear() function can be quite expensive because it traverses
the entire list, calling deleteNode() and removeNodeFromList() on each
element. If node destruction and deallocation can be handled some other
way, clearAndLeakNodesUnsafely() can be used to jettison all nodes
without bringing them into cache.

The function name is meant to be ominous.

llvm-svn: 171540
2013-01-04 22:35:42 +00:00
Jakob Stoklund Olesen
51378cea00 Move an assertion so it doesn't dereference end().
The R600 target has test cases that exercises this code.

llvm-svn: 171538
2013-01-04 22:17:31 +00:00
Paul Redmond
6ce33a6ae9 Do not vectorize loops with subtraction reductions
Since subtraction does not commute the loop vectorizer incorrectly vectorizes
reductions such as x = A[i] - x.

Disabling for now.

llvm-svn: 171537
2013-01-04 22:10:16 +00:00
Eric Christopher
3f90fbe286 Add a name for the anonymous type we're creating for subrange
types and a FIXME for what we should be doing. Should solve the
immediacy of PR12069 where our debug info is crashing another
tool.

llvm-svn: 171536
2013-01-04 21:51:53 +00:00
Michael Gottesman
c63800aa94 Added DEBUG message to ObjCARC when we optimize objc_retain => objc_retainAutorelasedReturnValue.
llvm-svn: 171535
2013-01-04 21:30:38 +00:00
Michael Gottesman
0f781a1a5c Fixed up some DEBUG messages where I was putting in the text of a message the method where it was being called when I should have just prefixed the actual message with Pass::Method.
Additionally I fixed some whitespace issues.

llvm-svn: 171534
2013-01-04 21:29:57 +00:00
Nadav Rotem
3349017273 Fix a warning
llvm-svn: 171525
2013-01-04 21:08:44 +00:00
Preston Gurd
b1c34fa73f The current Intel Atom microarchitecture has a feature whereby when a function
returns early then it is slightly faster to execute a sequence of NOP
instructions to wait until the return address is ready,
as opposed to simply stalling on the ret instruction
until the return address is ready.

When compiling for X86 Atom only, this patch will run a pass, called
"X86PadShortFunction" which will add NOP instructions where less than four
cycles elapse between function entry and return.

It includes tests.

Patch by Andy Zhang.

llvm-svn: 171524
2013-01-04 20:54:54 +00:00
Bill Wendling
fee1eee2b0 General cleanups.
* Remove dead methods.
* Use the 'operator==' method instead of 'contains', which isn't needed.
* Fix some comments.

No functionality change.

llvm-svn: 171523
2013-01-04 20:54:35 +00:00
Michael J. Spencer
641cf62d29 [Object][ELF] Add a maximum alignment. This is used by createELFObjectFile to create a properly aligned reader.
llvm-svn: 171520
2013-01-04 20:36:28 +00:00
Akira Hatanaka
b02400099c [mips] MipsTargetLowering::getSetCCResultType should return a vector type if
vectors are being compared.

llvm-svn: 171517
2013-01-04 20:06:01 +00:00
Akira Hatanaka
7477b1b91f [mips] 80 columns.
llvm-svn: 171515
2013-01-04 19:38:05 +00:00
Nick Kledzik
8ae5e45184 Fix how YAML I/O detects flow sequences.
Update test case to verify flow sequence is
written as a flow sequence.

llvm-svn: 171514
2013-01-04 19:32:00 +00:00
Akira Hatanaka
e07ce3ab22 [mips] Reorder template parameters. Remove class shift_rotate_imm32 and
shift_rotate_imm64.

llvm-svn: 171513
2013-01-04 19:25:46 +00:00
Manman Ren
6e5ea3bafd Memory Dependence Analysis: fix a miscompile that uses DT to approxmiate the
reachablity.

We conservatively approximate the reachability analysis by saying it is not
reachable if there is a single path starting from "From" and the path does not
reach "To".

rdar://12801584

llvm-svn: 171512
2013-01-04 19:19:47 +00:00
Akira Hatanaka
014ed59039 [mips] Refactor conditional move instructions.
llvm-svn: 171511
2013-01-04 19:16:38 +00:00
Akira Hatanaka
d01b04ad93 [mips] Refactor instructions which move data from or to coprocessors.
llvm-svn: 171510
2013-01-04 19:13:49 +00:00
Nadav Rotem
0dd9fa92a0 Update the gcc-loops benchmarks results with the new automatic unrolling feature.
llvm-svn: 171509
2013-01-04 19:10:34 +00:00
Eli Bendersky
bc7da64571 fix a couple of typos
llvm-svn: 171508
2013-01-04 19:09:15 +00:00
Eli Bendersky
f90ae6a2f1 Remove unused #include
llvm-svn: 171507
2013-01-04 19:08:43 +00:00
Adhemerval Zanella
fb3cdfff15 PowerPC: Fix eh_frame relocation for PIC
This patch fixes the PPC eh_frame definitions for the personality and 
frame unwinding for PIC objects. It makes PIC build correctly creates
relative relocations in the '.rela.eh_frame' segments and thus avoiding
a text relocation that generates a DT_TEXTREL segments in link phase.

llvm-svn: 171506
2013-01-04 19:08:13 +00:00
Nadav Rotem
d5d3609029 Add linpack-pc bench
llvm-svn: 171499
2013-01-04 19:00:42 +00:00
Joel Jones
9df037b59d Add Textmate bundle for Tablegen syntax-highlighting
llvm-svn: 171496
2013-01-04 18:55:24 +00:00
Nadav Rotem
7f7c4d9608 Change the default number of registers to prevent unrolling on targets that dont have this hook.
llvm-svn: 171489
2013-01-04 18:40:39 +00:00
Eric Christopher
d593f65fae Add a space to the end of the line so we don't get "itsbounds" in output.
llvm-svn: 171487
2013-01-04 18:30:36 +00:00
Pedro Artigas
b5becdf476 small fixes to enable the reuse of the pass manager across multiple modules
llvm-svn: 171475
2013-01-04 18:04:42 +00:00
Eric Christopher
80c6027067 Add section information for the DWARF5 split debug proposal
string offset section.

llvm-svn: 171474
2013-01-04 17:59:22 +00:00
Eric Christopher
085e845222 Make comment a bit more clear.
llvm-svn: 171473
2013-01-04 17:59:17 +00:00
Nadav Rotem
9e40cca003 Move the loop vectorizer from O2 to O3. It looks like the increase in code size actually hurts the performance on many programs.
llvm-svn: 171471
2013-01-04 17:57:44 +00:00
Nadav Rotem
483cacd34a Update the docs about the new unroll features.
llvm-svn: 171470
2013-01-04 17:49:45 +00:00
Nadav Rotem
cb3562a88e LoopVectorizer:
1. Add code to estimate register pressure.
2. Add code to select the unroll factor based on register pressure.
3. Add bits to TargetTransformInfo to provide the number of registers.

llvm-svn: 171469
2013-01-04 17:48:25 +00:00
Nadav Rotem
08d6ff1eaf Revert revision: 171467. This transformation is incorrect and makes some tests fail. Original message:
Simplified TRUNCATE operation that comes after SETCC. It is possible since SETCC result is 0 or -1.
Added a test.

llvm-svn: 171468
2013-01-04 17:35:21 +00:00
Elena Demikhovsky
d675e085b0 Simplified TRUNCATE operation that comes after SETCC. It is possible since SETCC result is 0 or -1.
Added a test.

llvm-svn: 171467
2013-01-03 08:48:33 +00:00
Michael Gottesman
5f81e1c2d0 Revert "Mark DIV/IDIV instructions hasSideEffects=1 because they can trap when dividing by 0. This is needed to keep early if conversion from moving them across basic blocks."
This reverts commit r171461 since it breaks the following tests:

Clang :: Analysis/outofbound-notwork.c
Clang :: Analysis/string-fail.c
Clang :: CXX/basic/basic.lookup/basic.lookup.qual/p6-0x.cpp
Clang :: CXX/basic/basic.lookup/basic.lookup.unqual/p15.cpp
Clang :: CXX/dcl.dcl/dcl.spec/dcl.fct.spec/p4.cpp
Clang :: CXX/dcl.dcl/dcl.spec/dcl.stc/p10.cpp
Clang :: CXX/temp/temp.param/p14.cpp
Clang :: CXX/temp/temp.res/temp.dep.res/temp.point/p1.cpp
Clang :: CodeGen/2009-02-13-zerosize-union-field-ppc.c
Clang :: CodeGen/blocks-2.c
Clang :: CodeGen/libcalls-d.c
Clang :: CodeGen/libcalls-ld.c
Clang :: CodeGenCXX/conversion-function.cpp
Clang :: CodeGenCXX/debug-info-limit-type.cpp
Clang :: CodeGenCXX/inheriting-constructor.cpp
Clang :: FixIt/fixit-errors.c
Clang :: FixIt/fixit-pmem.cpp
Clang :: Modules/namespaces.cpp
Clang :: PCH/changed-files.c
Clang :: PCH/pr4489.c
Clang :: PCH/source-manager-stack.c
Clang :: Parser/cxx-ambig-decl-expr-xfail.cpp
Clang :: SemaCXX/switch-implicit-fallthrough-cxx98.cpp
Clang :: SemaTemplate/instantiate-function-1.mm

llvm-svn: 171466
2013-01-03 08:18:30 +00:00
Michael Gottesman
a67b835abe Changed two debug statements that state that a queue had finished being processed when said queue was really a list to state a list had finished being processed.
llvm-svn: 171465
2013-01-03 08:09:27 +00:00
Michael Gottesman
27dfca0765 Added DEBUG message for ObjCARC when we zap a push/pop pair in ObjCARCAPElim::OptimizeBB.
llvm-svn: 171464
2013-01-03 08:09:17 +00:00
Michael Gottesman
5c76a62ee6 Added DEBUG message to ObjCARC when we transform objc_initWeak(p, null) => *p = null.
llvm-svn: 171463
2013-01-03 07:32:53 +00:00
Michael Gottesman
fcffa87a15 Added DEBUG message for ObjCARC when an inline asm marker is inserted for architectures where this is required to perform a retainAutoreleasedReturnValue optimization.
llvm-svn: 171462
2013-01-03 07:32:41 +00:00
Craig Topper
e040f2bdfd Mark DIV/IDIV instructions hasSideEffects=1 because they can trap when dividing by 0. This is needed to keep early if conversion from moving them across basic blocks.
llvm-svn: 171461
2013-01-03 06:40:20 +00:00
Hal Finkel
ff21253111 Better comment on VTTI::getShuffleCost
llvm-svn: 171459
2013-01-03 05:02:41 +00:00
NAKAMURA Takumi
eaed684039 Compiler.h: Leave LLVM_BUILTIN_UNREACHABLE undefined if it is unavailable in host compiler.
Users of LLVM_BUILTIN_UNREACHABLE should be responsible in the case when LLVM_BUILTIN_UNREACHABLE is undefined.

Actually, (0, (p)) in LLVM_ASSUME_ALIGNED(p, a) caused thousands of warnings on g++-4.4. It was a motivation in this commit.

llvm-svn: 171455
2013-01-03 03:30:22 +00:00