Commit Graph

4223 Commits

Author SHA1 Message Date
Kostya Serebryany a5054ad2f3 Extend Attributes to 64 bits
Problem: LLVM needs more function attributes than currently available (32 bits).
One such proposed attribute is "address_safety", which shows that a function is being checked for address safety (by AddressSanitizer, SAFECode, etc).

Solution:
- extend the Attributes from 32 bits to 64-bits
- wrap the object into a class so that unsigned is never erroneously used instead
- change "unsigned" to "Attributes" throughout the code, including one place in clang.
- the class has no "operator uint64 ()", but it has "uint64_t Raw() " to support packing/unpacking.
- the class has "safe operator bool()" to support the common idiom:  if (Attributes attr = getAttrs()) useAttrs(attr);
- The CTOR from uint64_t is marked explicit, so I had to add a few explicit CTOR calls
- Add the new attribute "address_safety". Doing it in the same commit to check that attributes beyond first 32 bits actually work.
- Some of the functions from the Attribute namespace are worth moving inside the class, but I'd prefer to have it as a separate commit.

Tested:
"make check" on Linux (32-bit and 64-bit) and Mac (10.6)
built/run spec CPU 2006 on Linux with clang -O2.


This change will break clang build in lib/CodeGen/CGCall.cpp.
The following patch will fix it.

llvm-svn: 148553
2012-01-20 17:56:17 +00:00
Chad Rosier 89e0d22cc6 Fix typo.
llvm-svn: 148497
2012-01-19 21:50:08 +00:00
Jakob Stoklund Olesen 374ed322f2 Add a new kind of MachineOperand: MO_RegisterMask.
Register masks will be used as a compact representation of large clobber
lists.  Currently, an x86 call instruction has some 40 operands
representing call-clobbered registers.  That's more than 1kB of useless
operands per call site.

A register mask operand references a bit mask of call-preserved
registers, everything else is clobbered.  The bit mask will typically
come from TargetRegisterInfo::getCallPreservedMask().

By abandoning ImplicitDefs for call-clobbered registers, it also becomes
possible to share call instruction descriptions between calling
conventions, and we can get rid of the WINCALL* instructions.

This patch introduces the new operand kind.  Future patches will add
RegMask support to target-independent passes before finally the fixed
clobber lists can be removed from call instruction descriptions.

llvm-svn: 148250
2012-01-16 19:22:00 +00:00
Joe Abbey 36cd89e7bd Adding a Hexagon cell for segmented stacks, as they have been implemented for X86 and not Sparc...
Committed as obvious

llvm-svn: 148237
2012-01-16 13:16:05 +00:00
Duncan Sands df9d781510 Try to clarify a little how exception handling works.
llvm-svn: 148136
2012-01-13 19:59:16 +00:00
Bill Wendling 49c4dfb534 Revert accidental commit.
llvm-svn: 148065
2012-01-12 23:06:28 +00:00
Bill Wendling ee5eaebc58 Fix the code that was WRONG.
The registers are placed into the saved registers list in the reverse order,
which is why the original loop was written to loop backwards.

llvm-svn: 148064
2012-01-12 23:05:03 +00:00
Eli Bendersky bbf8c9a939 Fix dead link
llvm-svn: 147721
2012-01-07 04:11:27 +00:00
Eli Bendersky 88676cff61 test commit (verifyiing commit access)
llvm-svn: 147600
2012-01-05 08:18:41 +00:00
Jakob Stoklund Olesen d19d3cab09 Freeze reserved registers before starting register allocation.
The register allocators don't currently support adding reserved
registers while they are running.  Extend the MRI API to keep track of
the set of reserved registers when register allocation started.

Target hooks like hasFP() and needsStackRealignment() can look at this
set to avoid reserving more registers during register allocation.

llvm-svn: 147577
2012-01-05 00:26:49 +00:00
Eric Christopher 2007dc8892 Fix typo.
llvm-svn: 147456
2012-01-03 18:38:37 +00:00
Duncan Sands 7610e45910 Correct spelling.
llvm-svn: 147435
2012-01-02 16:55:01 +00:00
NAKAMURA Takumi e9d3d21988 Happy new year 2012!
llvm-svn: 147395
2012-01-01 08:16:56 +00:00
Nadav Rotem 4c4d254f61 Update the LangRef documentation: the codegen does support this instruction.
llvm-svn: 147274
2011-12-25 21:32:35 +00:00
Nadav Rotem 1a0ae42d14 Add a few lines to the release notes:
1. pointer-vector
2. type legalizer changes and vector-select
3. X86 ISA changes.

llvm-svn: 146964
2011-12-20 08:02:50 +00:00
Dan Gohman 948ec427fa Add a line to ReleaseNotes for half float.
llvm-svn: 146939
2011-12-20 01:10:56 +00:00
Jakob Stoklund Olesen 24159e346d Remove a register class that can just as well be synthesized.
Add the new TableGen register class synthesizer feature to the release
notes.

llvm-svn: 146875
2011-12-19 16:53:40 +00:00
Dan Gohman 518cda42b9 The powers that be have decided that LLVM IR should now support 16-bit
"half precision" floating-point with a first-class type.

This patch adds basic IR support (but not codegen support).

llvm-svn: 146786
2011-12-17 00:04:22 +00:00
Eric Christopher 09cd3568f4 Fix spacing.
llvm-svn: 146782
2011-12-16 23:42:35 +00:00
Eric Christopher 3e3ecd0ab6 Update documentation.
llvm-svn: 146781
2011-12-16 23:42:33 +00:00
Devang Patel c16e1ed4bb Clarify and fix subprogram description.
llvm-svn: 146743
2011-12-16 17:50:04 +00:00
Jakob Stoklund Olesen 2a05f691ab Note ARM constant island alignment in the release notes.
The command line option should be removed, but not until the feature has
gotten a lot of testing. The ARMConstantIslandPass tends to have subtle
bugs that only show up after a while.

llvm-svn: 146739
2011-12-16 16:07:41 +00:00
Evan Cheng d647109ff9 Add a blurb about MachineInstr bundling support.
llvm-svn: 146603
2011-12-14 22:57:45 +00:00
Evan Cheng c984bf8fb0 Add high level description of MachineInstr bundles.
llvm-svn: 146589
2011-12-14 21:32:14 +00:00
Duncan Sands 9aaec15ce3 Vectors are not aggregate types (see isAggregateType).
llvm-svn: 146561
2011-12-14 15:44:20 +00:00
Kostya Serebryany 30c85d1945 mention AddressSanitizer in 3.1 release notes
llvm-svn: 146505
2011-12-13 19:46:24 +00:00
Chris Lattner 9f2a83eb59 Rip llvm 3.0 out of the release notes, making room for LLVM 3.1
llvm-svn: 146493
2011-12-13 17:55:30 +00:00
Bill Wendling 7ad1f3663c Use the example from clang, not the GCC frontend, which doesn't exist anymore.
llvm-svn: 146461
2011-12-13 01:07:07 +00:00
Daniel Dunbar e29ffffa48 llvm-build: Switch to using the common subdirectory list instead of
autodiscovery.

llvm-svn: 146437
2011-12-12 22:45:59 +00:00
Daniel Dunbar ea07f34afd llvm-build: Add sketchy support for preserving comments when using
--write-llvmbuild.

llvm-svn: 146434
2011-12-12 22:45:35 +00:00
Tony Linthicum 1213a7a57f Hexagon backend support
llvm-svn: 146412
2011-12-12 21:14:40 +00:00
Daniel Dunbar 27a7489a03 LLVMBuild: Remove trailing newline, which irked me.
llvm-svn: 146409
2011-12-12 19:48:00 +00:00
Chandler Carruth f6bb278ee8 Update the LangRef documentation for llvm.ctlz and llvm.cttz to specify
the behavior with the newly added flag for undefined results on a zero
input.

I'm terrible at documentation, so comments and suggestions welcome here.

llvm-svn: 146361
2011-12-12 04:36:04 +00:00
Bill Wendling 4517fe5020 Random cleanups. No description changes.
llvm-svn: 146288
2011-12-09 22:41:40 +00:00
Bill Wendling abe534c6cc Revert r146041 et al. The FunctionPass doesn't take an address but the ID.
llvm-svn: 146268
2011-12-09 19:11:02 +00:00
Chad Rosier c28f3e9e0b Typo.
llvm-svn: 146234
2011-12-09 02:00:44 +00:00
Bill Wendling 82d9272fc2 Also pass in correct initializer here.
llvm-svn: 146044
2011-12-07 18:18:11 +00:00
Bill Wendling 41d3595a26 Correct initializer in example.
llvm-svn: 146041
2011-12-07 18:02:44 +00:00
Jakub Staszak d64c99b07f Make Release Notes HTML 4.01 Strict.
llvm-svn: 145991
2011-12-06 23:33:07 +00:00
Anshuman Dasgupta bcfa2f83fb Add documentation for machine-independent DFA packetizer
llvm-svn: 145988
2011-12-06 23:12:42 +00:00
Jakub Staszak 43d7cf6b82 Add link to builtin_expect in Release Notes.
llvm-svn: 145979
2011-12-06 22:31:27 +00:00
Jakub Staszak cf9af0fc3b Add link to llvm.expect in Release Notes.
llvm-svn: 145964
2011-12-06 20:56:36 +00:00
Dan Gohman 32772f7790 Fix a subtle semantic issue with poison values that came up in
recent discussions. Poison can't make every value that depends on
it act in maximally undefined ways, because the optimizer may still
hoist code following the usual rules for undef. Make Poison invoke
its full undefined behavior only when it reaches an instruction with
externally visible side effects.

llvm-svn: 145913
2011-12-06 03:35:58 +00:00
Dan Gohman 5f115a78cb Line up the comments in a code example.
llvm-svn: 145908
2011-12-06 03:31:14 +00:00
Dan Gohman 9a2a0933ed Rename "Trap Values" to "Poison Values", to better reflect their
purpose, and to avoid ambiguity with other uses of the word "trap"
in LangRef.

llvm-svn: 145907
2011-12-06 03:18:47 +00:00
Bill Wendling b437ab8561 Move 'returns_twice' definition into alphabetical place.
llvm-svn: 145854
2011-12-05 21:27:54 +00:00
Nadav Rotem 3924cb0267 Add support for vectors of pointers.
llvm-svn: 145801
2011-12-05 06:29:09 +00:00
Jakub Staszak 5fd147f97e Fix table of contents.
llvm-svn: 145793
2011-12-04 20:44:25 +00:00
Jakub Staszak 5fef792d8c Add 'llvm.expect' intrinsic description.
llvm-svn: 145792
2011-12-04 18:29:26 +00:00
Chris Lattner f433c08659 fix broken tag
llvm-svn: 145590
2011-12-01 17:25:28 +00:00