1. A method for adaptively mapping an instruction cache, comprising: receiving addresses from a program counter, each address corresponding to a location in a system memory where an instruction is stored; defining a plurality of mapping functions, wherein each mapping function maps an address received from the program counter into a tag to identify an instruction stored in the system memory at the address provided by the program counter and an index to identify a location in an instruction cache for storing the instruction and the tag; observing, for each of the plurality of mapping functions, a mapping of a sequence of addresses from the program counter to determine, for each mapping function, a number of collisions; wherein a collision is an occurrence of an address from the program counter mapping to an index where the location in an instruction cache corresponding to the index is full of valid instructions; and determining from the observations a mapping function that reduces collisions.