aboutsummaryrefslogtreecommitdiffstats
path: root/lib/hipe/main
AgeCommit message (Collapse)Author
2016-05-31Cleanups in hipe/main and hipe/rtlKostis Sagonas
* Rewrite matching statements in ?when_option macro to form that silences dialyzer's unmatched_return warnings * Treat compiler warnings as errors when compiling files in main
2016-05-31Eliminate stupid if constructKostis Sagonas
2016-05-31Cosmetic cleanupsKostis Sagonas
2016-05-26Merge branch 'margnus1/llvm-compatibility/PR-1057/OTP-13626'Sverker Eriksson
2016-05-23Added elimination of maps:is_key/2 calls to HiPEMagnus Lång
* Implemented removal of maps:is_key/2 calls of which the result is known in a new pass during the typed phase, called hipe_icode_call_elim. * Added the option icode_call_elim that enables the hipe_icode_call_elim pass, and made it default for o2.
2016-05-11hipe_llvm: Disable floats for x86Magnus Lång
A bug in LLVM miscompiles x86 functions that have floats are spilled to stack. We work around it by disabling (inlined) floats when using llvm on x86. Once a LLVM version in which the bug is fixed is released, we can make the workaround conditional depending on the version.
2016-05-04hipe_llvm: Syntax compatibility with 3.7-3.8Magnus Lång
2016-03-15update copyright-yearHenrik Nord
2015-10-09Update and cleanup HiPE recordsKostis Sagonas
The bulk of the changes concerns cleanups and code refactorings concerning record constructions that assigned 'undefined' to record fields whose type did not contain this value. See commit 8ce35b2. While at it, some new type definitions were introduced and type names were used instead of record type notation. Minor code cleaups were also done.
2015-08-31erts,hipe,dialyzer: Fix hipe checkum of target runtime systemSverker Eriksson
Main problem: A faulty HIPE_LITERAL_CRC was not detected by the loader. Strangeness #1: Dialyzer should ask the hipe compiler about the target checksum, not an internal bif. Strangeness #2: The HIPE_SYSTEM_CRC checksum was based on the HIPE_LITERALS_CRC checksum. Solution: New HIPE_ERTS_CHECKSUM which is an bxor of the two (now independent) HIPE_LITERALS_CRC and HIPE_SYSTEM_CRC. HIPE_LITERALS_CRC represents values that are assumed to stay constant for different VM configurations of the same arch, and are therefor hard coded into the hipe compiler. HIPE_SYSTEM_CRC represents values that may differ between VM variants. By default the hipe compiler asks the running VM for this checksum, in order to create beam files for the same running VM. The hipe compiler can be configured (with "make XCOMP=yes ...") to create beam files for another VM variant, in which case HIPE_SYSTEM_CRC is also hard coded. ToDo: Treat all erts properties the same. Either ask the running VM or hard coded into hipe (if XCOMP=yes). This will simplify and reduce the risk of dangerous mismatches. One concern might be the added overhead from more frequent calls to hipe_bifs:get_rts_param.
2015-08-24erts: Change THE_NON_VALUE to not be hard coded in hipe compilerSverker Eriksson
Instead ask running VM for the value of THE_NON_VALUE, which is different between opt and debug VM. Same hipe compiler can now compile for both opt and debug VM.
2015-06-22Merge branch 'bruce/change-license'Bruce Yinhe
OTP-12845 * bruce/change-license: fix errors caused by changed line numbers Change license text to APLv2
2015-06-18Change license text to APLv2Bruce Yinhe
2015-06-13Simplify handling of o2 and o3 option expansionKostis Sagonas
A recent rewrite of some code in this file (commit 355f4b5) exposed some dialyzer warnings of some code which is unreachable. Indeed, checking whether one executes on an unsupported architecture when expanding the 'o2' and 'o3' hipe compiler options is unnecessary because that check is performed in the expansion of the 'o1' option anyway. While at it, simplified the code a bit not to have a very long case clause.
2015-06-04HiPE help shouldn't modify the calling processRichard Carlsson
2015-05-25Update runtime_dependencies in application resource filesHans Bolinder
Applications that use the new erl_anno module are depending on STDLIB 2.5. Note that CosNotification, Megaco, SNMP, Xmerl, and Parsetools use the erl_anno module via the Yecc parsers only (the header file in lib/parsetools/include/yeccpre.hrl calls the erl_anno module). HiPE does not call the erl_anno module, but uses an exported type. We have chosen to make HiPE dependent on the erl_anno module.
2015-03-20Replace usage of erlang:now() with usage of new APIRickard Green
2014-03-30Check for required LLVM version or issue errorYiannis Tsiouris
This checks that a required LLVM version (i.e. 3.4 or greater) appears in $PATH when 'to_llvm' flag is used; in case of failure, abort compilation with an error.
2014-03-21Merge branch 'yiannist/hipe-llvm-backend'Henrik Nord
* yiannist/hipe-llvm-backend: Support the LLVM backend in HiPE Implement the LLVM backend Extend RTL API to support the LLVM backend Add support for llvm unique symbols in hipe_gensym Add a BIF that only returns the atom ok Move some common code in hipe_pack_constants Add better specs in hipe_pack_constants and cleanup OTP-11801
2014-03-20Introduce runtime_dependencies in .app filesRickard Green
Most dependencies introduced are exactly the dependencies to other applications found by xref. That is, there might be real dependencies missing. There might also be pure debug dependencies listed that probably should be removed. Each application has to be manually inspected in order to ensure that all real dependencies are listed. All dependencies introduced are to application versions used in OTP 17.0. This since the previously used version scheme wasn't designed for this, and in order to minimize the work of introducing the dependencies.
2014-03-07Support the LLVM backend in HiPEYiannis Tsiouris
Add flags to enable and use the LLVM backend: * to_llvm: use the LLVM pipeline for compilation (default optimization level is O3), * llvm_save_temps: save the intermediate files in current directory in order to be able to debug or optimize the LLVM assembly, * {to_llvm, O}: set the optimization level of LLVM opt and llc tools. Add some debug support to the loader; no semantic change intented.
2014-02-24Make hipe non-upgradable by setting appup file emptyTobias Schlager
The reason for this is that if you are running a system with native compiled code, then you will have major problems with soft upgrade and the only reasonable way to go is to restart your emulator. Currently there is no instruction that will force ONLY a restart of the emulator, so the solution would be to hand write a relup with only a restart_emulator instruction. By letting hipe.appup be empty, systools will complain and not generate a relup - which should indicate that you might have to write your relup by hand.
2014-02-24Fix missing module on hipe app file templateTobias Schlager
2014-02-18Fix library application appup filesTobias Schlager
As discussed in issue #240 *all* OTP library applications use the '.*' wildcard as up and down version. This makes library applications always up- and downgradeable. Using the wildcard version obsoletes all maintenance tasks regarding library applications' appup files. Additionally, it prevents upgrade problems caused by automatically included application dependencies when using reltool to create releases. Missing copyright headers are now consistently present.
2013-03-12Loosen the assumptions of code that handles escaping functionsKostis Sagonas
The HiPE compiler implicitly relied on the assumption that a function will never appear as both exported and also used as function closure. This was true because the BEAM compiler prior to R16B created module local anonymous functions for each closure. A proposed change to the BEAM compiler invalidates this invariant, so in order to accommodate for this change there needs to be a change of how the set of possibly escaping functions is computed. While doing this, the code was simplified by taking out a boolean() tag that indicated whether a function is a closure or exported and also slightly cleaned up the affected modules.
2013-02-25Clean up and homogenize text messages for optionsKostis Sagonas
2013-01-15Implement ./otp_build configure --enable-silent-rulesAnthony Ramine
With silent rules, the output of make is less verbose and compilation warnings are easier to spot. Silent rules are disabled by default and can be disabled or enabled at will by make V=0 and make V=1.
2012-06-08Merge branch 'lukas/otp/install_with_whitespace/OTP-10107' into maintLukas Larsson
* lukas/otp/install_with_whitespace/OTP-10107: Update to work with space in include path Update to work with whitespace in exec path
2012-06-05Update to work with whitespace in exec pathLukas Larsson
OTP-10106 OTP-10107
2012-05-10Remove stale code for hybrid heap and incremental GCBjörn Gustavsson
The hybrid heap emulator was last working in the non-SMP R11B run-time system. When the constant pools were introduced in R12B, the hybrid heap emulator was not updated to handle them. At this point, the harm from reduced readability of the code is greater than any potential usefulness of keeping the code.
2012-03-30Update copyright yearsBjörn-Egil Dahlberg
2012-02-28Make hipe hipe-compiled w/ --enable-native-libsPatrik Nyblom
2012-02-22Merge branch 'tst/no_hipe_ceach' into maintGustav Simonsson
* tst/no_hipe_ceach: Remove hipe_ceach from hipe.app.src to fix reltool-generated release startup OTP-9939
2012-02-20Fix discrepancy in compile_infoKostis Sagonas
The BEAM disassembler used the atom 'none' to signify the absence of a compile_info chunk in a .beam file. This clashes with the type declaration of the compile_info field of a #beam_file{} record as containing a list. Use [] to signify the absence of this chunk. This simplifies the code and avoids a dialyzer warning. For fixing a similar problem and for consistency, changed also the return type of the attributes field of the #beam_file{} record. This required a change in the beam_disasm test suite.
2012-01-01Remove hipe_ceach from hipe.app.src to fix reltool-generated release startupTim Stewart
hipe_ceach.erl has disappeared, but is still referred to from hipe.app.src, causing reltool-generated releases crash when they cannot find the module.
2011-12-09Update copyright yearsBjörn-Egil Dahlberg
2011-11-28Merge branch 'bjorn/compiler/options/OTP-9752'Björn Gustavsson
* bjorn/compiler/options/OTP-9752: filename documentation: Recommend against using filename:find_src/1,2 Teach filename:find_src/1,2 to handle slim or stripped BEAM files filename: Eliminate failing call to Mod:module_info(source_file) filename.erl:filter_options/1: Remove handling of dead options compiler: Don't include {cwd,_} in module_info(compile) compiler: Don't include source code options in module_info(compile) hipe: Teach hipe to handle slim or stripped BEAM files
2011-11-28hipe: Remove single function compilationBjörn Gustavsson
Compiling single functions (as opposed to whole modules) to native code complicates code management in HiPE. It would also vastly complicate whole-module optimizations, such as returning multiple return values instead of tuples within a module. As a first step, remove the external interface for the single compilation feature. In the future, there are many things that could be restructured and simplified.
2011-11-24hipe: Teach hipe to handle slim or stripped BEAM filesBjörn Gustavsson
2011-09-29Update copyright yearsBjörn-Egil Dahlberg
2011-07-19Clean up hipe.hrl.src (Signed-off-by: Kostis)Tuncer Ayaz
2011-02-14Translate RTL to PPC code on PPC64 tooKostis Sagonas
2010-11-22hipe: Update types and specsKostis Sagonas
2010-08-27Fix hipe:load/1Paul Guyot
hipe:load/1 (and unexported hipe:load/2) just did not work. Calling it would fail with a badmatch because only the hipe chunk was passed to do_load/3's third parameter called WholeModule. Since this parameter is then passed to beam_lib:all_chunks/1 which accepts the whole module as a binary as well as a path to the beam file, and since a path is exactly what we have in load/2, the fix consists in letting do_load/3 accept a path and passing it from load/2.
2010-01-26OTP-8343 The documentation is now possible to build in an open sourceLars G Thorsen
environment after a number of bugs are fixed and some features are added in the documentation build process. - The arity calculation is updated. - The module prefix used in the function names for bif's are removed in the generated links so the links will look like http://www.erlang.org/doc/man/erlang.html#append_element-2 instead of http://www.erlang.org/doc/man/erlang.html#erlang:append_element-2 - Enhanced the menu positioning in the html documentation when a new page is loaded. - A number of corrections in the generation of man pages (thanks to Sergei Golovan) - Moved some man pages to more apropriate sections, pages in section 4 moved to 5 and pages in 6 moved to 7. - The legal notice is taken from the xml book file so OTP's build process can be used for non OTP applications.
2009-11-20The R13B03 release.OTP_R13B03Erlang/OTP