Fariborz Jahanian [Tue, 4 Dec 2012 18:25:34 +0000 (18:25 +0000)]
additional test for declaration tag of a class extension.
// rdar://
12378714
llvm-svn: 169289
Nadav Rotem [Tue, 4 Dec 2012 18:17:33 +0000 (18:17 +0000)]
Add support for reduction variables when IF-conversion is enabled.
llvm-svn: 169288
Jyotsna Verma [Tue, 4 Dec 2012 18:05:01 +0000 (18:05 +0000)]
Add patterns to define 'combine', 'tstbit', 'ct0/cl0' (count trailing/leading zeros)
instructions.
llvm-svn: 169287
Alexander Kornienko [Tue, 4 Dec 2012 17:27:50 +0000 (17:27 +0000)]
Error recovery part 2
Summary: Adds recovery for structural errors in clang-format.
Reviewers: djasper
Reviewed By: djasper
CC: cfe-commits, silvas
Differential Revision: http://llvm-reviews.chandlerc.com/D164
llvm-svn: 169286
Fariborz Jahanian [Tue, 4 Dec 2012 17:20:57 +0000 (17:20 +0000)]
objective-c blocks: Consider padding due to alignment
after the fixed size block header when generating
captured block variable info. // rdar://
12773256
llvm-svn: 169285
Jyotsna Verma [Tue, 4 Dec 2012 17:12:00 +0000 (17:12 +0000)]
Add constant extender support to ALU32 instructions for V2.
llvm-svn: 169284
Eli Bendersky [Tue, 4 Dec 2012 17:00:11 +0000 (17:00 +0000)]
A test in thid directory was not being run because lit.local.cfg didn't
include .ll files. Fix that.
llvm-svn: 169283
Duncan Sands [Tue, 4 Dec 2012 16:36:05 +0000 (16:36 +0000)]
Fix comment typo.
llvm-svn: 169282
Bill Schmidt [Tue, 4 Dec 2012 16:18:08 +0000 (16:18 +0000)]
This patch introduces initial-exec model support for thread-local storage
on 64-bit PowerPC ELF.
The patch includes code to handle external assembly and MC output with the
integrated assembler. It intentionally does not support the "old" JIT.
For the initial-exec TLS model, the ABI requires the following to calculate
the address of external thread-local variable x:
Code sequence Relocation Symbol
ld 9,x@got@tprel(2) R_PPC64_GOT_TPREL16_DS x
add 9,9,x@tls R_PPC64_TLS x
The register 9 is arbitrary here. The linker will replace x@got@tprel
with the offset relative to the thread pointer to the generated GOT
entry for symbol x. It will replace x@tls with the thread-pointer
register (13).
The two test cases verify correct assembly output and relocation output
as just described.
PowerPC-specific selection node variants are added for the two
instructions above: LD_GOT_TPREL and ADD_TLS. These are inserted
when an initial-exec global variable is encountered by
PPCTargetLowering::LowerGlobalTLSAddress(), and later lowered to
machine instructions LDgotTPREL and ADD8TLS. LDgotTPREL is a pseudo
that uses the same LDrs support added for medium code model's LDtocL,
with a different relocation type.
The rest of the processing is straightforward.
llvm-svn: 169281
Justin Holewinski [Tue, 4 Dec 2012 16:11:51 +0000 (16:11 +0000)]
Update release notes for NVPTX
llvm-svn: 169280
Dmitry Vyukov [Tue, 4 Dec 2012 15:46:05 +0000 (15:46 +0000)]
tsan: output thread names
llvm-svn: 169279
Alexander Kornienko [Tue, 4 Dec 2012 15:40:36 +0000 (15:40 +0000)]
Clang-format error recovery part 1
Reviewers: klimek
CC: cfe-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D163
llvm-svn: 169278
NAKAMURA Takumi [Tue, 4 Dec 2012 15:32:03 +0000 (15:32 +0000)]
c-index-test.c: Make C89-compliant.
llvm-svn: 169277
Dmitri Gribenko [Tue, 4 Dec 2012 15:13:46 +0000 (15:13 +0000)]
libclang: Add a function to libclang for retrieving the bit width value
Patch by Jyun-Yan You.
llvm-svn: 169276
Kostya Serebryany [Tue, 4 Dec 2012 15:13:30 +0000 (15:13 +0000)]
[tsan] add a compile-time error for 64-bit-only support
llvm-svn: 169275
Daniel Jasper [Tue, 4 Dec 2012 14:54:30 +0000 (14:54 +0000)]
Make parenthesis counting and aligning a bit saner.
Review: http://llvm-reviews.chandlerc.com/D162
llvm-svn: 169274
Dmitry Vyukov [Tue, 4 Dec 2012 14:50:10 +0000 (14:50 +0000)]
tsan: make atomic operations atomic again
llvm-svn: 169273
Alexander Kornienko [Tue, 4 Dec 2012 14:46:19 +0000 (14:46 +0000)]
Enum formatting implementation
Reviewers: djasper, klimek
Reviewed By: klimek
CC: cfe-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D161
llvm-svn: 169272
Manuel Klimek [Tue, 4 Dec 2012 14:42:08 +0000 (14:42 +0000)]
Fix spelling I ran over while proof-reading tests.
llvm-svn: 169271
Kostya Serebryany [Tue, 4 Dec 2012 14:39:51 +0000 (14:39 +0000)]
[tsan] test the allocator with CompactSizeClassMap
llvm-svn: 169270
Eli Bendersky [Tue, 4 Dec 2012 14:34:00 +0000 (14:34 +0000)]
Get rid of references to Tcl, DejagGNU, old test structure, discourage the use
of grep in favor of FileCheck, and other cleanups.
llvm-svn: 169269
NAKAMURA Takumi [Tue, 4 Dec 2012 14:31:59 +0000 (14:31 +0000)]
ToolChains.cpp: Fixup r169260, clang/Config/config.h needs to be listed *last*, or llvm/Config/llvm-config.h could not be read in header files.
llvm-svn: 169268
Kostya Serebryany [Tue, 4 Dec 2012 14:15:17 +0000 (14:15 +0000)]
[tsan] minor interface refactoring
llvm-svn: 169267
Dmitry Vyukov [Tue, 4 Dec 2012 14:08:39 +0000 (14:08 +0000)]
tsan: fix nand operation
llvm-svn: 169266
Dmitry Vyukov [Tue, 4 Dec 2012 14:01:21 +0000 (14:01 +0000)]
tsan: add __attribute__((visibility("default"))) to interface functions
llvm-svn: 169265
Kostya Serebryany [Tue, 4 Dec 2012 13:59:22 +0000 (13:59 +0000)]
[tsan] refactor the allocator tests to allow testing other flavours of the allocator (add templates)
llvm-svn: 169264
Eli Bendersky [Tue, 4 Dec 2012 13:55:17 +0000 (13:55 +0000)]
Remove the very out-of-date listing of "very important LLVM areas". I don't
think it adds much and keeping it up-to-date is (obviously) a chore.
llvm-svn: 169263
Manuel Klimek [Tue, 4 Dec 2012 13:40:29 +0000 (13:40 +0000)]
Fixes crash in isDerivedFrom for recursive templates.
llvm-svn: 169262
Daniel Jasper [Tue, 4 Dec 2012 13:02:32 +0000 (13:02 +0000)]
Small fixes to unary operator recognition and handling of include
directives.
llvm-svn: 169261
Chandler Carruth [Tue, 4 Dec 2012 12:24:59 +0000 (12:24 +0000)]
Autotools has the same include guard for both Clang and LLVM's config.h.
Shuffling order causes the wrong one to win.
CMake didn't exhibit this problem because Clang's has *no* guards.
I'll fix this properly tomorrow when Eric and I can check both build
systems and get them to DTRT, but for now unbreak some bots by hoisting
this header.
llvm-svn: 169260
Dmitry Vyukov [Tue, 4 Dec 2012 12:19:53 +0000 (12:19 +0000)]
tsan: fix trace handling when trace is reused between threads
llvm-svn: 169259
Daniel Jasper [Tue, 4 Dec 2012 12:08:08 +0000 (12:08 +0000)]
Update matcher documentation with script.
We still need to make the python script understand some of the new
matchers, but this should be an improvement.
llvm-svn: 169258
Daniel Jasper [Tue, 4 Dec 2012 11:54:27 +0000 (11:54 +0000)]
Add parameterCountIs() matcher.
llvm-svn: 169257
Evgeniy Stepanov [Tue, 4 Dec 2012 11:42:05 +0000 (11:42 +0000)]
Improve MSan tests.
llvm-svn: 169256
NAKAMURA Takumi [Tue, 4 Dec 2012 11:34:27 +0000 (11:34 +0000)]
KillTheDoctor.cpp: Restore Win32 SDK headers before r169251.
llvm-svn: 169255
Daniel Jasper [Tue, 4 Dec 2012 10:50:12 +0000 (10:50 +0000)]
Replace workarounds with correct fixes.
Also fix header guard.
http://llvm-reviews.chandlerc.com/D159
llvm-svn: 169254
Chandler Carruth [Tue, 4 Dec 2012 10:46:21 +0000 (10:46 +0000)]
Clean up the sample include orderings, not that it really matters...
llvm-svn: 169253
Chandler Carruth [Tue, 4 Dec 2012 10:44:52 +0000 (10:44 +0000)]
Sort the #include lines for tools/...
Again, tools are trickier to pick the main module header for than
library source files. I've started to follow the pattern of using
LLVMContext.h when it is included as a stub for program source files.
llvm-svn: 169252
Chandler Carruth [Tue, 4 Dec 2012 10:37:14 +0000 (10:37 +0000)]
Sort the #include lines for utils/...
I've tried to find main moudle headers where possible, but the TableGen
stuff may warrant someone else looking at it.
llvm-svn: 169251
Chandler Carruth [Tue, 4 Dec 2012 10:23:08 +0000 (10:23 +0000)]
Sort the #include lines for unittest/...
llvm-svn: 169250
Chandler Carruth [Tue, 4 Dec 2012 10:16:57 +0000 (10:16 +0000)]
Sort the #include lines of the examples/... tree.
llvm-svn: 169249
Chandler Carruth [Tue, 4 Dec 2012 10:08:59 +0000 (10:08 +0000)]
Teach the include sorter to quickly skip files with an extension that
doesn't look like it will have C++ code in it.
Suggestions on a better heuristic are welcome.
llvm-svn: 169248
Chandler Carruth [Tue, 4 Dec 2012 09:59:54 +0000 (09:59 +0000)]
Teach the include sorter to skip files under test trees and under INPUTS
trees. This allows running the input sorter on the entire clang
repository cleanly now.
llvm-svn: 169247
Chandler Carruth [Tue, 4 Dec 2012 09:53:39 +0000 (09:53 +0000)]
Sort the #include lines under utils/...
llvm-svn: 169245
Chandler Carruth [Tue, 4 Dec 2012 09:53:37 +0000 (09:53 +0000)]
Really sort the #include lines in unittests/...
I forgot to re-sort after fixing main module headers.
llvm-svn: 169244
Chandler Carruth [Tue, 4 Dec 2012 09:45:34 +0000 (09:45 +0000)]
Sort the #include lines for unittests/...
I've tried to place sensible headers at the top as main-module headers.
llvm-svn: 169243
Chandler Carruth [Tue, 4 Dec 2012 09:44:38 +0000 (09:44 +0000)]
Teach the include sorting script about the gtest headers; sort them with
the system headers.
llvm-svn: 169242
Chandler Carruth [Tue, 4 Dec 2012 09:37:22 +0000 (09:37 +0000)]
Sort the #include lines for examples/...
llvm-svn: 169241
Chandler Carruth [Tue, 4 Dec 2012 09:25:21 +0000 (09:25 +0000)]
Sort #include lines for tools/...
Completely automated with sort_includes.py
llvm-svn: 169240
Chandler Carruth [Tue, 4 Dec 2012 09:21:50 +0000 (09:21 +0000)]
Update the #include lines of the extra tools.
llvm-svn: 169239
Chandler Carruth [Tue, 4 Dec 2012 09:18:49 +0000 (09:18 +0000)]
Sort #include lines for all files under include/...
This is a simpler sort, entirely automatic with the help of
llvm/utils/sort_includes.py -- no manual edits here.
llvm-svn: 169238
Chandler Carruth [Tue, 4 Dec 2012 09:13:33 +0000 (09:13 +0000)]
Sort all of Clang's files under 'lib', and fix up the broken headers
uncovered.
This required manually correcting all of the incorrect main-module
headers I could find, and running the new llvm/utils/sort_includes.py
script over the files.
I also manually added quite a few missing headers that were uncovered by
shuffling the order or moving headers up to be main-module-headers.
llvm-svn: 169237
NAKAMURA Takumi [Tue, 4 Dec 2012 08:20:41 +0000 (08:20 +0000)]
ASTTests, ASTMatchersTests: Move clangEdit before clangAst in USEDLIB.
llvm-svn: 169236
NAKAMURA Takumi [Tue, 4 Dec 2012 08:20:35 +0000 (08:20 +0000)]
Untabify (in USEDLIBS, Makefile(s)).
llvm-svn: 169235
Kostya Serebryany [Tue, 4 Dec 2012 07:54:41 +0000 (07:54 +0000)]
[tsan] refactoring and comment changes in sanitizer_common/sanitizer_allocator{,64}.h. No functionality change
llvm-svn: 169234
NAKAMURA Takumi [Tue, 4 Dec 2012 07:40:33 +0000 (07:40 +0000)]
clang/Lex: [CMake] Update CMakefiles since r169229.
llvm-svn: 169233
Bill Wendling [Tue, 4 Dec 2012 07:33:40 +0000 (07:33 +0000)]
Don't test for ASM output but for IR output.
llvm-svn: 169232
Dmitry Vyukov [Tue, 4 Dec 2012 07:28:25 +0000 (07:28 +0000)]
tsan: better error message if we fail to intercept some function
currently the message is SIGSEGV
llvm-svn: 169231
Dmitry Vyukov [Tue, 4 Dec 2012 07:27:32 +0000 (07:27 +0000)]
tsan: check if PWD env var is absent
On some programs I see:
failed to open suppressions file '<null>/testing/tsan/v2/tsan.supp'
llvm-svn: 169230
Argyrios Kyrtzidis [Tue, 4 Dec 2012 07:27:05 +0000 (07:27 +0000)]
Refactor recording the preprocessor conditional directive regions out of
PreprocessingRecord and into its own class, PPConditionalDirectiveRecord.
Decoupling allows a client to use the functionality of PPConditionalDirectiveRecord
without needing a PreprocessingRecord.
llvm-svn: 169229
Argyrios Kyrtzidis [Tue, 4 Dec 2012 07:26:53 +0000 (07:26 +0000)]
In the PreprocessingRecord, to identify the different conditional directive regions
use the SourceLocation at the start of the respective region, instead of a unique integer.
llvm-svn: 169228
Argyrios Kyrtzidis [Tue, 4 Dec 2012 07:26:48 +0000 (07:26 +0000)]
[libclang] Avoid copying the CompileCommand related strings when wrapping them to a CXString.
llvm-svn: 169227
Argyrios Kyrtzidis [Tue, 4 Dec 2012 07:26:44 +0000 (07:26 +0000)]
Introduce CompilationDatabase::getAllCompileCommands() that returns all
compile commands of the database and expose it via the libclang API.
llvm-svn: 169226
NAKAMURA Takumi [Tue, 4 Dec 2012 07:25:24 +0000 (07:25 +0000)]
VMCoreTests/PassManagerTest.cpp: Appease msvc not to do "using llvm::Pass" in class template.
FIXME: I have not checked whether to be compiled on msvc11.
llvm-svn: 169225
Chandler Carruth [Tue, 4 Dec 2012 07:12:27 +0000 (07:12 +0000)]
Sort includes for all of the .h files under the 'lib' tree. These were
missed in the first pass because the script didn't yet handle include
guards.
Note that the script is now able to handle all of these headers without
manual edits. =]
llvm-svn: 169224
Nadav Rotem [Tue, 4 Dec 2012 07:11:52 +0000 (07:11 +0000)]
Give scalar if-converted blocks half the score because they are not always executed due to CF.
llvm-svn: 169223
Chandler Carruth [Tue, 4 Dec 2012 07:04:58 +0000 (07:04 +0000)]
Address review comments from Matt on the sort_includes.py script.
1) Teach it to handle files with #include on the first line -- these do
actually exist in LLVM.
2) Support llvm-c and clang-c include projects.
3) Nuke some stail imports.
4) Switch to using os.path to split the file extension off.
5) Remove debugging leftovers.
6) Add docstring (a really puny one) for the sort function.
I'm continuing te avoid stripping the whitespace on the RHS to preserve
whatever newline characters happen to be in the original file.
llvm-svn: 169222
Chandler Carruth [Tue, 4 Dec 2012 07:04:57 +0000 (07:04 +0000)]
Add a comment about the requirement that the Windows.h header be last.
This comment has the dual effect of blocking reorderings with the
sort_include script.
llvm-svn: 169221
NAKAMURA Takumi [Tue, 4 Dec 2012 06:58:05 +0000 (06:58 +0000)]
clang/test/CodeGenCXX/debug-info-zero-length-arrays.cpp: Add explicit triple, x86_64-unknown-unknown. It was incompatible to i686.
llvm-svn: 169220
Bill Wendling [Tue, 4 Dec 2012 06:21:27 +0000 (06:21 +0000)]
Add a 'count' field to the DWARF subrange.
The count field is necessary because there isn't a difference between the 'lo'
and 'hi' attributes for a one-element array and a zero-element array. When the
count is '0', we know that this is a zero-element array. When it's >=1, then
it's a normal constant sized array. When it's -1, then the array is unbounded.
llvm-svn: 169219
Bill Wendling [Tue, 4 Dec 2012 06:20:49 +0000 (06:20 +0000)]
Add a 'count' field to the DWARF subrange.
The count field is necessary because there isn't a difference between the 'lo'
and 'hi' attributes for a one-element array and a zero-element array. When the
count is '0', we know that this is a zero-element array. When it's >=1, then
it's a normal constant sized array. When it's -1, then the array is unbounded.
llvm-svn: 169218
Nadav Rotem [Tue, 4 Dec 2012 06:15:11 +0000 (06:15 +0000)]
Add the last part that is needed for vectorization of if-converted code.
Added the code that actually performs the if-conversion during vectorization.
We can now vectorize this code:
for (int i=0; i<n; ++i) {
unsigned k = 0;
if (a[i] > b[i]) <------ IF inside the loop.
k = k * 5 + 3;
a[i] = k; <---- K is a phi node that becomes vector-select.
}
llvm-svn: 169217
Kostya Serebryany [Tue, 4 Dec 2012 06:14:01 +0000 (06:14 +0000)]
[asan] add experimental -asan-realign-stack option (true by default, which does not change the current behavior)
llvm-svn: 169216
Bill Wendling [Tue, 4 Dec 2012 06:12:44 +0000 (06:12 +0000)]
Add a 'getCount' method to get the number of elements in the subrange.
llvm-svn: 169215
Matt Beaumont-Gay [Tue, 4 Dec 2012 05:41:27 +0000 (05:41 +0000)]
Add 'using' declarations to suppress -Woverloaded-virtual warnings.
llvm-svn: 169214
Jyotsna Verma [Tue, 4 Dec 2012 05:00:31 +0000 (05:00 +0000)]
Move all operand definitions into HexagonOperands.td
llvm-svn: 169213
Jyotsna Verma [Tue, 4 Dec 2012 04:29:16 +0000 (04:29 +0000)]
Move generic Hexagon subtarget information into Hexagon.td
llvm-svn: 169212
Sean Silva [Tue, 4 Dec 2012 03:45:27 +0000 (03:45 +0000)]
docs: Fix broken link.
llvm-svn: 169211
Sean Silva [Tue, 4 Dec 2012 03:30:36 +0000 (03:30 +0000)]
docs: Fix dead link.
Apparently Dinkumware are no longer hosting their nice reference
manuals. Thankfully, `cppreference.com` can fill that role well.
llvm-svn: 169210
Shuxin Yang [Tue, 4 Dec 2012 03:28:32 +0000 (03:28 +0000)]
rdar://
12329730 (2nd part, revised)
The type of shirt-right (logical or arithemetic) should remain unchanged
when transforming "X << C1 >> C2" into "X << (C1-C2)"
llvm-svn: 169209
Sean Silva [Tue, 4 Dec 2012 03:20:08 +0000 (03:20 +0000)]
docs: Convert ProgrammersManual to reST.
Patch by Alexander Zinenko!
llvm-svn: 169208
Richard Smith [Tue, 4 Dec 2012 02:48:16 +0000 (02:48 +0000)]
Document the existence of -fsanitize=bounds.
llvm-svn: 169207
Alexander Potapenko [Tue, 4 Dec 2012 02:41:47 +0000 (02:41 +0000)]
[ASan] Do not build the interceptors that use ObjC blocks if the compiler does not support blocks.
Need to define MISSING_BLOCKS_SUPPORT in this case at buildtime.
Patch by Jack Howarth <howarth@bromo.med.uc.edu>
llvm-svn: 169206
Greg Clayton [Tue, 4 Dec 2012 02:22:16 +0000 (02:22 +0000)]
<rdar://problem/
12750060>
Add the ability to get a symbol or symbols by name and type from a SBModule, and also the ability to get all symbols by name and type from SBTarget objects.
llvm-svn: 169205
Jim Ingham [Tue, 4 Dec 2012 01:57:57 +0000 (01:57 +0000)]
Missing #include to pick up def'n of TerminalState.h.
llvm-svn: 169203
Greg Clayton [Tue, 4 Dec 2012 01:57:36 +0000 (01:57 +0000)]
Get rid of a warning where functions in DNB.h were extern "C" when they don't need to be anymore.
llvm-svn: 169202
Alexey Samsonov [Tue, 4 Dec 2012 01:38:15 +0000 (01:38 +0000)]
ASan: add new interface functions - __asan_(un)poison_stack_memory. Calls to these functions are inserted by the instrumentation pass in use-after-scope mode
llvm-svn: 169201
Alexey Samsonov [Tue, 4 Dec 2012 01:34:23 +0000 (01:34 +0000)]
ASan: add initial support for handling llvm.lifetime intrinsics in ASan - emit calls into runtime library that poison memory for local variables when their lifetime is over and unpoison memory when their lifetime begins.
llvm-svn: 169200
NAKAMURA Takumi [Tue, 4 Dec 2012 01:03:31 +0000 (01:03 +0000)]
clang/test/Index/comment-objc-decls.m: Try to fix r169193, to add x86_64-darwin.
llvm-svn: 169199
Jakub Staszak [Tue, 4 Dec 2012 01:00:52 +0000 (01:00 +0000)]
Simplify code. No functionality change.
llvm-svn: 169198
Manman Ren [Tue, 4 Dec 2012 00:52:33 +0000 (00:52 +0000)]
Stack Alignment: when creating stack objects in MachineFrameInfo, make sure
the alignment is clamped to TargetFrameLowering.getStackAlignment if the target
does not support stack realignment or the option "realign-stack" is off.
This will cause miscompile if the address is treated as aligned and add is
replaced with or in DAGCombine.
Added a bool StackRealignable to TargetFrameLowering to check whether stack
realignment is implemented for the target. Also added a bool RealignOption
to MachineFrameInfo to check whether the option "realign-stack" is on.
rdar://
12713765
llvm-svn: 169197
Jakub Staszak [Tue, 4 Dec 2012 00:50:06 +0000 (00:50 +0000)]
Use dyn_cast instead of isa and cast. No functionality change.
llvm-svn: 169196
NAKAMURA Takumi [Tue, 4 Dec 2012 00:49:34 +0000 (00:49 +0000)]
LoopVectorize.cpp: Suppress a warning. [-Wunused-variable]
llvm-svn: 169195
NAKAMURA Takumi [Tue, 4 Dec 2012 00:49:28 +0000 (00:49 +0000)]
Fix whitespace.
llvm-svn: 169194
Fariborz Jahanian [Tue, 4 Dec 2012 00:47:33 +0000 (00:47 +0000)]
Testing objective-C declarations embedded in
<declaration> tag of Comment XML and fixed a
missing declaration of ivars private to @implementation
as result of the testing. // rdar://
12378714
llvm-svn: 169193
Jakob Stoklund Olesen [Tue, 4 Dec 2012 00:46:13 +0000 (00:46 +0000)]
Remove the old TRI::ResolveRegAllocHint() and getRawAllocationOrder() hooks.
These functions have been replaced by TRI::getRegAllocationHints() which
provides the same capabilities.
llvm-svn: 169192
Michael Ilseman [Tue, 4 Dec 2012 00:36:06 +0000 (00:36 +0000)]
Have clang use LLVM IR's fast-math flags when in FastMath or FiniteMathOnly modes. Test cases included.
llvm-svn: 169191
Jakob Stoklund Olesen [Tue, 4 Dec 2012 00:35:59 +0000 (00:35 +0000)]
Remove VirtRegMap::getRegAllocPref().
Now that there can be multiple hint registers from targets, it doesn't
make sense to have a function that returns 'the' preferred register.
llvm-svn: 169190
Greg Clayton [Tue, 4 Dec 2012 00:32:51 +0000 (00:32 +0000)]
<rdar://problem/
12798131>
Cleaned up the option parsing code to always pass around the short options as integers. Previously we cast this down to "char" and lost some information. I recently added an assert that would detect duplicate short character options which was firing during the test suite.
This fix does the following:
- make sure all short options are treated as "int"
- make sure that short options can be non-printable values when a short option is not required or when an option group is mixed into many commands and a short option is not desired
- fix the help printing to "do the right thing" in all cases. Previously if there were duplicate short character options, it would just not emit help for the duplicates
- fix option parsing when there are duplicates to parse options correctly. Previously the option parsing, when done for an OptionGroup, would just start parsing options incorrectly by omitting table entries and it would end up setting the wrong option value
llvm-svn: 169189
Jakob Stoklund Olesen [Tue, 4 Dec 2012 00:30:22 +0000 (00:30 +0000)]
Use MRI::getSimpleHint() instead of getRegAllocPref() in remaining cases.
Targets can provide multiple hints now, so getRegAllocPref() doesn't
make sense any longer because it only returns one preferred register.
Replace it with getSimpleHint() in the remaining heuristics. This
function only
llvm-svn: 169188