Changes between Version 8 and Version 9 of LLVM_ToolDemo


Ignore:
Timestamp:
Mar 14, 2014, 2:27:30 AM (5 years ago)
Author:
cameron
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • LLVM_ToolDemo

    v8 v9  
    188188Compile your modified file and make sure it produces the same
    189189output as the unmodified program.   What happens to performance?
     190
     191Follow the syntax given in the LLVM reference manual, for example for the `lshr` instruction
     192see http://llvm.org/docs/LangRef.html#lshr-instruction
     193Say that you have made your modified file in {{{mod-re.ll}}}.  To compile it, you can simply use clang++.
     194{{{
     195clang++ mod-re.ll -msse2  -O3 -std=gnu++0x -o mod-re
     196}}}
     197
    190198Due: Wednesday, March 19
    191 before class by email to cameron@cs.sfu.ca.   Worth 2 marks
     199before class by email to my sfu.ca id: cameron.   Worth 2 marks
    192200towards the course total of 100. 
     201
     202== Getting LLVM tools ==
     203
     204I found the following information from http://stackoverflow.com/questions/17657261/how-to-install-clang-pre-built-binaries-ubuntu-12-04
     205useful.
     206
     207  -  Install the llvm toolchain repository, for Ubuntu 12.04, in your software sources
     208
     209    {{{sudo add-apt-repository 'deb http://llvm.org/apt/precise/ llvm-toolchain-precise main'}}}
     210
     211  -   Install the gpg key of that repository to authenticate package downloads from it. Note the final hyphen on this commandline:
     212
     213    {{{wget -O - http://llvm.org/apt/llvm-snapshot.gpg.key|sudo apt-key add -}}}
     214
     215  - Refresh your package database again:
     216
     217    {{{sudo apt-get update}}}
     218
     219  - Install the whole llvm+clang toolchain:
     220
     221    {{{sudo apt-get install clang-3.4 clang-3.4-doc libclang-common-3.4-dev libclang-3.4-dev libclang1-3.4 libclang1-3.4-dbg libllvm-3.4-ocaml-dev libllvm3.4 libllvm3.4-dbg lldb-3.4 llvm-3.4 llvm-3.4-dev llvm-3.4-doc llvm-3.4-examples llvm-3.4-runtime cpp11-migrate-3.4 clang-format-3.4}}}
     222