llvm-6502/docs
Dan Gohman fff6c5332f 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102140 91177308-0d34-0410-b5e6-96231b3b80d8
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
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
Bugpoint.html
CFEBuildInstrs.html
CMake.html
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
CompilerWriterInfo.html
DebuggingJITedCode.html
DeveloperPolicy.html Fix typos in comments. 2010-02-26 20:18:32 +00:00
doxygen.cfg.in
doxygen.css
doxygen.footer
doxygen.header
doxygen.intro
ExceptionHandling.html
ExtendedIntegerResults.txt
ExtendingLLVM.html
FAQ.html Fix a typo. 2010-02-25 23:41:41 +00:00
GarbageCollection.html
GCCFEBuildInstrs.html
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
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
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
llvm.css
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
re_format.7
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
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
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