1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 19:23:23 +01:00
llvm-mirror/docs
Dan Gohman a75ad3c1ca Add an initial description of a new concept: trap values, and change
the definition of the nsw and nuw flags to make use of it.

nsw was introduced to help optimizers answer yes to the following:

  // Can we change i from i32 to i64 to eliminate the cast inside the loop?
  for (int i = 0; i < n; ++i) A[i] *= 0.1;

  // Can we assume that this loop will eventually terminate?
  for (int i = 0; i <= n; ++i) A[i] *= 0.1;

In its current form, it isn't truly sufficient for either.

In the first case, if the increment overflows, it'll still have some
valid i32 value; sign-extending it will produce a value which is 33
homogeneous sign bits trailed by 31 independent undef bits. If i is
promoted to i64, it won't have those same values when it reaches that
point. (The compiler could recover here by reasoning about how i is
used by the load, but that's a lot more complicated and isn't always
possible.)

In the second case, there is no value for i which will be greater than
n, so having the increment return undef on overflow doesn't help.

Trap values are a formalization of some existing concepts that we have
about LLVM IR, and give the optimizers a better basis for answering yes
to both questions above.

llvm-svn: 102140
2010-04-22 23:14:21 +00:00
..
CommandGuide Rewrite makefiles to explicitly reference DESTDIR to fix bug 3153. 2010-03-04 20:56:19 +00:00
HistoricalNotes remove two docs about the old Sparc backend which used Value*'s for vregs. 2009-09-13 17:25:49 +00:00
img
tutorial Fix the ocaml kaleidoscope tutorial to fix linking external libraries. 2010-03-21 23:15:13 +00:00
AliasAnalysis.html remove anders-aa from mainline, it isn't maintained and is 2010-03-01 19:24:17 +00:00
BitCodeFormat.html reduce redundant are's. 2010-01-20 17:53:51 +00:00
Bugpoint.html Improve bugpoint doc, patch by Timo Lindfors! 2009-10-12 18:12:47 +00:00
CFEBuildInstrs.html Global replace of yellow W3C "valid HTML/CSS" icons with blue ones. 2008-12-11 17:34:48 +00:00
CMake.html Add two CMake flags LLVM_ENABLE_PEDANTIC and LLVM_ENABLE_WERROR, 2009-12-01 02:21:51 +00:00
CodeGenerator.html Fix a grammaro. 2010-04-09 18:39:54 +00:00
CodingStandards.html Fix typos in comments. 2010-02-26 20:18:32 +00:00
CommandLine.html Fix typos in comments. 2010-02-26 20:18:32 +00:00
CompilerDriver.html Refer to -help instead of --help since this is what tools themselves say. 2010-02-18 14:08:13 +00:00
CompilerDriverTutorial.html Regenerate. 2009-06-17 02:56:48 +00:00
CompilerWriterInfo.html Global replace of yellow W3C "valid HTML/CSS" icons with blue ones. 2008-12-11 17:34:48 +00:00
DebuggingJITedCode.html Add documentation on how to use enable debug information in the JIT and use it with GDB. 2009-09-21 02:34:59 +00:00
DeveloperPolicy.html Fix typos in comments. 2010-02-26 20:18:32 +00:00
doxygen.cfg.in Test commit. 2009-05-19 01:56:08 +00:00
doxygen.css
doxygen.footer update year 2009-02-27 11:28:46 +00:00
doxygen.header
doxygen.intro
ExceptionHandling.html Update of 94055 to track the IR level call site information via an intrinsic. 2010-01-28 01:45:32 +00:00
ExtendedIntegerResults.txt add this to SVN to allow collaborative hacking. 2009-04-01 21:11:04 +00:00
ExtendingLLVM.html Removed warnings from HTML 4.01 validator: trailing slashes in <br> and <img> 2008-12-11 18:23:24 +00:00
FAQ.html Fix a typo. 2010-02-25 23:41:41 +00:00
GarbageCollection.html Documentation: fix HTML validation errors. 2009-08-05 15:42:44 +00:00
GCCFEBuildInstrs.html Clarify that later compiler versions are known to 2009-07-05 12:01:44 +00:00
GetElementPtr.html Merge the advanced getelementptr FAQ into the regular 2010-02-25 18:16:03 +00:00
GettingStarted.html Refer to -help instead of --help since this is what tools themselves say. 2010-02-18 14:08:13 +00:00
GettingStartedVS.html Documentation: fix HTML validation errors. 2009-08-05 15:42:44 +00:00
GoldPlugin.html Refresh this documentation. Things have changed a bit in the mean time: 2010-04-17 07:00:24 +00:00
HowToReleaseLLVM.html Update to note that clang has a baseline now. Dropping x86-32 for MacOS. 2010-04-05 18:35:37 +00:00
HowToSubmitABug.html Documentation: Perform automated correction of common typos. 2009-10-12 14:46:08 +00:00
index.html Give packagers some advice about how to build LLVM so it's useful to 2010-02-26 00:54:42 +00:00
LangRef.html Add an initial description of a new concept: trap values, and change 2010-04-22 23:14:21 +00:00
Lexicon.html Add MC and LTO, two terms I just had to explain on IRC. 2010-04-05 05:48:47 +00:00
LinkTimeOptimization.html Documentation: Perform automated correction of common typos. 2009-10-12 14:46:08 +00:00
llvm.css Regenerate documentation. 2009-05-06 01:41:47 +00:00
Makefile Rewrite makefiles to explicitly reference DESTDIR to fix bug 3153. 2010-03-04 20:56:19 +00:00
MakefileGuide.html Add LLVM{CC,CXX} make variables, which specify the configured path the LLVM 2010-02-23 10:00:53 +00:00
Packaging.html Test that docs are updating. 2010-02-26 22:25:06 +00:00
Passes.html The -condprop pass has been deleted. 2010-04-22 20:48:34 +00:00
ProgrammersManual.html Fix a grammaro. 2010-03-30 20:04:57 +00:00
Projects.html Grammar fix. 2009-08-13 20:08:52 +00:00
re_format.7 Add regular expression matching support, based on OpenBSD regexec()/regcomp() 2009-08-30 08:24:09 +00:00
ReleaseNotes.html add macruby back 2010-04-22 21:34:16 +00:00
SourceLevelDebugging.html don't reference DwarfWriter 2010-04-05 04:11:11 +00:00
SystemLibrary.html we beat exceptions out of lib/system a long time ago. 2009-07-17 21:11:24 +00:00
TableGenFundamentals.html improve tblgen doc, pointed out by Zhongxing. 2010-04-22 16:45:27 +00:00
TestingGuide.html Test autoupdate. 2010-02-26 21:23:59 +00:00
UsingLibraries.html Remove the IA-64 backend. 2009-07-24 00:30:09 +00:00
WritingAnLLVMBackend.html don't reference DwarfWriter 2010-04-05 04:11:11 +00:00
WritingAnLLVMPass.html update docs for api change. 2010-04-16 23:07:44 +00:00